1 ; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -inline < %s | FileCheck %s
2 ; RUN: opt -mtriple=amdgcn-amd-amdhsa -S -passes='cgscc(inline)' < %s | FileCheck %s
4 define i32 @func_default() #0 {
8 define i32 @func_ieee_enabled() #1 {
12 define i32 @func_ieee_disabled() #2 {
16 ; CHECK-LABEL: @default_call_default(
17 ; CHECK-NEXT: ret i32 0
18 define i32 @default_call_default() #0 {
19 %call = call i32 @func_default()
23 ; CHECK-LABEL: @ieee_enabled_call_default(
24 ; CHECK-NEXT: ret i32 0
25 define i32 @ieee_enabled_call_default() #1 {
26 %call = call i32 @func_default()
30 ; CHECK-LABEL: @ieee_enabled_call_ieee_enabled(
31 ; CHECK-NEXT: ret i32 0
32 define i32 @ieee_enabled_call_ieee_enabled() #1 {
33 %call = call i32 @func_ieee_enabled()
37 ; CHECK-LABEL: @ieee_enabled_call_ieee_disabled(
38 ; CHECK-NEXT: call i32 @func_ieee_disabled()
39 define i32 @ieee_enabled_call_ieee_disabled() #1 {
40 %call = call i32 @func_ieee_disabled()
44 ; CHECK-LABEL: @ieee_disabled_call_default(
45 ; CHECK-NEXT: call i32 @func_default()
46 define i32 @ieee_disabled_call_default() #2 {
47 %call = call i32 @func_default()
51 ; CHECK-LABEL: @ieee_disabled_call_ieee_enabled(
52 ; CHECK-NEXT: call i32 @func_ieee_enabled()
53 define i32 @ieee_disabled_call_ieee_enabled() #2 {
54 %call = call i32 @func_ieee_enabled()
58 ; CHECK-LABEL: @ieee_disabled_call_ieee_disabled(
59 ; CHECK-NEXT: ret i32 0
60 define i32 @ieee_disabled_call_ieee_disabled() #2 {
61 %call = call i32 @func_ieee_disabled()
65 ; Shader calling a compute function
66 ; CHECK-LABEL: @amdgpu_ps_default_call_default(
67 ; CHECK-NEXT: call i32 @func_default()
68 define amdgpu_ps i32 @amdgpu_ps_default_call_default() #0 {
69 %call = call i32 @func_default()
73 ; Shader with ieee enabled calling a compute function
74 ; CHECK-LABEL: @amdgpu_ps_ieee_enabled_call_default(
75 ; CHECK-NEXT: ret i32 0
76 define amdgpu_ps i32 @amdgpu_ps_ieee_enabled_call_default() #1 {
77 %call = call i32 @func_default()
81 ; CHECK-LABEL: @amdgpu_ps_ieee_disabled_call_default(
82 ; CHECK-NEXT: call i32 @func_default()
83 define amdgpu_ps i32 @amdgpu_ps_ieee_disabled_call_default() #2 {
84 %call = call i32 @func_default()
88 attributes #0 = { nounwind }
89 attributes #1 = { nounwind "amdgpu-ieee"="true" }
90 attributes #2 = { nounwind "amdgpu-ieee"="false" }