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_xnack_enabled() #1 {
12 define i32 @func_xnack_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: @xnack_enabled_call_default(
24 ; CHECK-NEXT: ret i32 0
25 define i32 @xnack_enabled_call_default() #1 {
26 %call = call i32 @func_default()
30 ; CHECK-LABEL: @xnack_enabled_call_xnack_enabled(
31 ; CHECK-NEXT: ret i32 0
32 define i32 @xnack_enabled_call_xnack_enabled() #1 {
33 %call = call i32 @func_xnack_enabled()
37 ; CHECK-LABEL: @xnack_enabled_call_xnack_disabled(
38 ; CHECK-NEXT: ret i32 0
39 define i32 @xnack_enabled_call_xnack_disabled() #1 {
40 %call = call i32 @func_xnack_disabled()
44 ; CHECK-LABEL: @xnack_disabled_call_default(
45 ; CHECK-NEXT: ret i32 0
46 define i32 @xnack_disabled_call_default() #2 {
47 %call = call i32 @func_default()
51 ; CHECK-LABEL: @xnack_disabled_call_xnack_enabled(
52 ; CHECK-NEXT: ret i32 0
53 define i32 @xnack_disabled_call_xnack_enabled() #2 {
54 %call = call i32 @func_xnack_enabled()
58 ; CHECK-LABEL: @xnack_disabled_call_xnack_disabled(
59 ; CHECK-NEXT: ret i32 0
60 define i32 @xnack_disabled_call_xnack_disabled() #2 {
61 %call = call i32 @func_xnack_disabled()
65 attributes #0 = { nounwind }
66 attributes #1 = { nounwind "target-features"="+xnack" }
67 attributes #2 = { nounwind "target-features"="-xnack" }