Skip to content

Commit

Permalink
AMDGPU: Add inlining testcases for denormal-fp-math
Browse files Browse the repository at this point in the history
Somehow missed this one and it's not working correctly
  • Loading branch information
arsenm committed Jun 9, 2023
1 parent 74acfa6 commit d0b9cb1
Showing 1 changed file with 46 additions and 2 deletions.
48 changes: 46 additions & 2 deletions llvm/test/Transforms/Inline/AMDGPU/inline-denormal-fp-math.ll
Original file line number Diff line number Diff line change
Expand Up @@ -795,8 +795,15 @@ define i32 @func_psz_psz_f32() #10 {
ret i32 11
}

define i32 @call_dynamic_dynamic_from_psz_psz_f32() #10 {
; CHECK-LABEL: @call_dynamic_dynamic_from_psz_psz_f32(
define i32 @func_dynamic_dynamic_psz_psz_f32() #12 {
; CHECK-LABEL: @func_dynamic_dynamic_psz_psz_f32(
; CHECK-NEXT: ret i32 12
;
ret i32 12
}

define i32 @call_dynamic_dynamic_f32_from_psz_psz_f32() #10 {
; CHECK-LABEL: @call_dynamic_dynamic_f32_from_psz_psz_f32(
; CHECK-NEXT: ret i32 10
;
%result = call i32 @func_dynamic_dynamic_f32()
Expand All @@ -820,6 +827,42 @@ define i32 @call_psz_psz_from_ieee_ieee_f32() #11 {
ret i32 %result
}

define i32 @call_dynamic_dynamic_from_psz_psz_f32() #10 {
; CHECK-LABEL: @call_dynamic_dynamic_from_psz_psz_f32(
; CHECK-NEXT: [[RESULT:%.*]] = call i32 @func_dynamic_dynamic()
; CHECK-NEXT: ret i32 [[RESULT]]
;
%result = call i32 @func_dynamic_dynamic()
ret i32 %result
}

define i32 @call_dynamic_dynamic_f32_from_psz_psz() #1 {
; CHECK-LABEL: @call_dynamic_dynamic_f32_from_psz_psz(
; CHECK-NEXT: [[RESULT:%.*]] = call i32 @func_dynamic_dynamic_f32()
; CHECK-NEXT: ret i32 [[RESULT]]
;
%result = call i32 @func_dynamic_dynamic_f32()
ret i32 %result
}

define i32 @call_psz_psz_f32_from_psz_psz() #1 {
; CHECK-LABEL: @call_psz_psz_f32_from_psz_psz(
; CHECK-NEXT: [[RESULT:%.*]] = call i32 @func_psz_psz_f32()
; CHECK-NEXT: ret i32 [[RESULT]]
;
%result = call i32 @func_psz_psz_f32()
ret i32 %result
}

define i32 @call_dynamic_dynamic_psz_psz_f32_from_psz_psz() #1 {
; CHECK-LABEL: @call_dynamic_dynamic_psz_psz_f32_from_psz_psz(
; CHECK-NEXT: [[RESULT:%.*]] = call i32 @func_dynamic_dynamic_psz_psz_f32()
; CHECK-NEXT: ret i32 [[RESULT]]
;
%result = call i32 @func_dynamic_dynamic_psz_psz_f32()
ret i32 %result
}

attributes #0 = { "denormal-fp-math"="ieee,ieee" }
attributes #1 = { "denormal-fp-math"="preserve-sign,preserve-sign" }
attributes #2 = { "denormal-fp-math"="preserve-sign,ieee" }
Expand All @@ -832,3 +875,4 @@ attributes #8 = { "denormal-fp-math"="dynamic,preserve-sign" }
attributes #9 = { "denormal-fp-math-f32"="dynamic,dynamic" }
attributes #10 = { "denormal-fp-math-f32"="preserve-sign,preserve-sign" }
attributes #11 = { "denormal-fp-math-f32"="ieee,ieee" "denormal-fp-math"="preserve-sign,preserve-sign" }
attributes #12 = { "denormal-fp-math"="dynamic,dynamic" "denormal-fp-math-f32"="preserve-sign,preserve-sign" }

0 comments on commit d0b9cb1

Please sign in to comment.