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 4 5define i32 @func_default() #0 { 6; CHECK-LABEL: @func_default( 7; CHECK-NEXT: ret i32 0 8; 9 ret i32 0 10} 11 12define i32 @func_denormal_fp_math_ieee_ieee() #1 { 13; CHECK-LABEL: @func_denormal_fp_math_ieee_ieee( 14; CHECK-NEXT: ret i32 0 15; 16 ret i32 0 17} 18 19define i32 @func_denormal_fp_math_flush_flush() #2 { 20; CHECK-LABEL: @func_denormal_fp_math_flush_flush( 21; CHECK-NEXT: ret i32 0 22; 23 ret i32 0 24} 25 26define 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 29; 30 %call = call i32 @func_denormal_fp_math_ieee_ieee() 31 ret i32 %call 32} 33 34define 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]] 38; 39 %call = call i32 @func_denormal_fp_math_flush_flush() 40 ret i32 %call 41} 42 43define i32 @func_denormal_fp_math_flush_ieee() #3 { 44; CHECK-LABEL: @func_denormal_fp_math_flush_ieee( 45; CHECK-NEXT: ret i32 0 46; 47 ret i32 0 48} 49 50define i32 @func_denormal_fp_math_ieee_flush() #4 { 51; CHECK-LABEL: @func_denormal_fp_math_ieee_flush( 52; CHECK-NEXT: ret i32 0 53; 54 ret i32 0 55} 56 57define 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]] 61; 62 %call = call i32 @func_denormal_fp_math_flush_ieee() 63 ret i32 %call 64} 65 66define 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]] 70; 71 %call = call i32 @func_denormal_fp_math_ieee_flush() 72 ret i32 %call 73} 74 75attributes #0 = { nounwind } 76attributes #1 = { nounwind "denormal-fp-math"="ieee,ieee" } 77attributes #2 = { nounwind "denormal-fp-math"="preserve-sign,preserve-sign" } 78attributes #3 = { nounwind "denormal-fp-math"="preserve-sign,ieee" } 79attributes #4 = { nounwind "denormal-fp-math"="ieee,preserve-sign" } 80