• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3
4define i32 @func_default() #0 {
5  ret i32 0
6}
7
8define i32 @func_xnack_enabled() #1 {
9  ret i32 0
10}
11
12define i32 @func_xnack_disabled() #2 {
13  ret i32 0
14}
15
16; CHECK-LABEL: @default_call_default(
17; CHECK-NEXT: ret i32 0
18define i32 @default_call_default() #0 {
19  %call = call i32 @func_default()
20  ret i32 %call
21}
22
23; CHECK-LABEL: @xnack_enabled_call_default(
24; CHECK-NEXT: ret i32 0
25define i32 @xnack_enabled_call_default() #1 {
26  %call = call i32 @func_default()
27  ret i32 %call
28}
29
30; CHECK-LABEL: @xnack_enabled_call_xnack_enabled(
31; CHECK-NEXT: ret i32 0
32define i32 @xnack_enabled_call_xnack_enabled() #1 {
33  %call = call i32 @func_xnack_enabled()
34  ret i32 %call
35}
36
37; CHECK-LABEL: @xnack_enabled_call_xnack_disabled(
38; CHECK-NEXT: ret i32 0
39define i32 @xnack_enabled_call_xnack_disabled() #1 {
40  %call = call i32 @func_xnack_disabled()
41  ret i32 %call
42}
43
44; CHECK-LABEL: @xnack_disabled_call_default(
45; CHECK-NEXT: ret i32 0
46define i32 @xnack_disabled_call_default() #2 {
47  %call = call i32 @func_default()
48  ret i32 %call
49}
50
51; CHECK-LABEL: @xnack_disabled_call_xnack_enabled(
52; CHECK-NEXT: ret i32 0
53define i32 @xnack_disabled_call_xnack_enabled() #2 {
54  %call = call i32 @func_xnack_enabled()
55  ret i32 %call
56}
57
58; CHECK-LABEL: @xnack_disabled_call_xnack_disabled(
59; CHECK-NEXT: ret i32 0
60define i32 @xnack_disabled_call_xnack_disabled() #2 {
61  %call = call i32 @func_xnack_disabled()
62  ret i32 %call
63}
64
65attributes #0 = { nounwind }
66attributes #1 = { nounwind "target-features"="+xnack" }
67attributes #2 = { nounwind "target-features"="-xnack" }
68