[DAGCombiner] Add target hook function to decide folding (mul (add x, c1), c2)
[llvm-project.git] / llvm / test / Transforms / Inline / AMDGPU / inline-denormal-fp-math.ll
blob8d2c3d9a6f31ee9b3f4089ec75d9741cf7e02bdf
1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -inline < %s | FileCheck %s
3 ; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -passes='cgscc(inline)' < %s | FileCheck %s
5 define i32 @func_default() #0 {
6 ; CHECK-LABEL: @func_default(
7 ; CHECK-NEXT:    ret i32 0
9   ret i32 0
12 define i32 @func_denormal_fp_math_ieee_ieee() #1 {
13 ; CHECK-LABEL: @func_denormal_fp_math_ieee_ieee(
14 ; CHECK-NEXT:    ret i32 0
16   ret i32 0
19 define i32 @func_denormal_fp_math_flush_flush() #2 {
20 ; CHECK-LABEL: @func_denormal_fp_math_flush_flush(
21 ; CHECK-NEXT:    ret i32 0
23   ret i32 0
26 define i32 @call_func_ieee_ieee_from_flush_flush() #2 {
27 ; CHECK-LABEL: @call_func_ieee_ieee_from_flush_flush(
28 ; CHECK-NEXT:    ret i32 0
30   %call = call i32 @func_denormal_fp_math_ieee_ieee()
31   ret i32 %call
34 define i32 @call_func_flush_flush_from_ieee_ieee() #1 {
35 ; CHECK-LABEL: @call_func_flush_flush_from_ieee_ieee(
36 ; CHECK-NEXT:    [[CALL:%.*]] = call i32 @func_denormal_fp_math_flush_flush()
37 ; CHECK-NEXT:    ret i32 [[CALL]]
39   %call = call i32 @func_denormal_fp_math_flush_flush()
40   ret i32 %call
43 define i32 @func_denormal_fp_math_flush_ieee() #3 {
44 ; CHECK-LABEL: @func_denormal_fp_math_flush_ieee(
45 ; CHECK-NEXT:    ret i32 0
47   ret i32 0
50 define i32 @func_denormal_fp_math_ieee_flush() #4 {
51 ; CHECK-LABEL: @func_denormal_fp_math_ieee_flush(
52 ; CHECK-NEXT:    ret i32 0
54   ret i32 0
57 define i32 @call_func_flush_ieee_from_ieee_ieee() #1 {
58 ; CHECK-LABEL: @call_func_flush_ieee_from_ieee_ieee(
59 ; CHECK-NEXT:    [[CALL:%.*]] = call i32 @func_denormal_fp_math_flush_ieee()
60 ; CHECK-NEXT:    ret i32 [[CALL]]
62   %call = call i32 @func_denormal_fp_math_flush_ieee()
63   ret i32 %call
66 define i32 @call_func_ieee_flush_from_ieee_ieee() #1 {
67 ; CHECK-LABEL: @call_func_ieee_flush_from_ieee_ieee(
68 ; CHECK-NEXT:    [[CALL:%.*]] = call i32 @func_denormal_fp_math_ieee_flush()
69 ; CHECK-NEXT:    ret i32 [[CALL]]
71   %call = call i32 @func_denormal_fp_math_ieee_flush()
72   ret i32 %call
75 attributes #0 = { nounwind }
76 attributes #1 = { nounwind "denormal-fp-math"="ieee,ieee" }
77 attributes #2 = { nounwind "denormal-fp-math"="preserve-sign,preserve-sign" }
78 attributes #3 = { nounwind "denormal-fp-math"="preserve-sign,ieee" }
79 attributes #4 = { nounwind "denormal-fp-math"="ieee,preserve-sign" }