150
|
1 ; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -O1 < %s | FileCheck -check-prefix=OPT %s
|
221
|
2 ; RUN: opt -S -mtriple=amdgcn-amd-amdhsa -passes='default<O1>' < %s | FileCheck -check-prefix=OPT %s
|
150
|
3 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx1010 -verify-machineinstrs < %s | FileCheck -check-prefix=LLC %s
|
|
4
|
|
5 ; OPT: declare void @foo4() local_unnamed_addr #0
|
|
6 ; OPT: define void @foo3() local_unnamed_addr #1
|
|
7 ; OPT: define void @foo2() local_unnamed_addr #1
|
|
8 ; OPT: define void @foo1() local_unnamed_addr #1
|
|
9 ; OPT: define amdgpu_kernel void @kernel1() local_unnamed_addr #2
|
|
10 ; OPT: define amdgpu_kernel void @kernel2() local_unnamed_addr #2
|
|
11 ; OPT: attributes #0 = { {{.*}} "target-features"="+wavefrontsize64" }
|
|
12 ; OPT: attributes #1 = { {{.*}} "target-features"="{{.*}},-wavefrontsize16,+wavefrontsize32,-wavefrontsize64
|
|
13 ; OPT: attributes #2 = { {{.*}} "target-features"="+wavefrontsize32
|
|
14 ; OPT: attributes #3 = { nounwind }
|
|
15
|
|
16 ; LLC: foo3:
|
|
17 ; LLC: sample asm
|
|
18 ; LLC: foo2:
|
|
19 ; LLC: sample asm
|
|
20 ; LLC: foo1:
|
|
21 ; LLC: foo4@gotpcrel32@lo+4
|
221
|
22 ; LLC: foo4@gotpcrel32@hi+12
|
150
|
23 ; LLC: foo3@gotpcrel32@lo+4
|
221
|
24 ; LLC: foo3@gotpcrel32@hi+12
|
150
|
25 ; LLC: foo2@gotpcrel32@lo+4
|
221
|
26 ; LLC: foo2@gotpcrel32@hi+12
|
150
|
27 ; LLC: foo1@gotpcrel32@lo+4
|
221
|
28 ; LLC: foo1@gotpcrel32@hi+12
|
150
|
29 ; LLC: kernel1:
|
|
30 ; LLC: foo1@gotpcrel32@lo+4
|
221
|
31 ; LLC: foo1@gotpcrel32@hi+12
|
150
|
32 ; LLC: kernel2:
|
|
33 ; LLC: foo2@gotpcrel32@lo+4
|
221
|
34 ; LLC: foo2@gotpcrel32@hi+12
|
150
|
35
|
|
36 declare void @foo4() #1
|
|
37
|
|
38 define void @foo3() #1 {
|
|
39 entry:
|
|
40 call void asm sideeffect "; sample asm", ""()
|
|
41 ret void
|
|
42 }
|
|
43
|
|
44 define void @foo2() #1 {
|
|
45 entry:
|
|
46 call void asm sideeffect "; sample asm", ""()
|
|
47 ret void
|
|
48 }
|
|
49
|
|
50 define void @foo1() #1 {
|
|
51 entry:
|
|
52 tail call void @foo4()
|
|
53 tail call void @foo3()
|
|
54 tail call void @foo2()
|
|
55 tail call void @foo2()
|
|
56 tail call void @foo1()
|
|
57 ret void
|
|
58 }
|
|
59
|
|
60 define amdgpu_kernel void @kernel1() #0 {
|
|
61 entry:
|
|
62 tail call void @foo1()
|
|
63 ret void
|
|
64 }
|
|
65
|
|
66 define amdgpu_kernel void @kernel2() #0 {
|
|
67 entry:
|
|
68 tail call void @foo2()
|
|
69 ret void
|
|
70 }
|
|
71
|
|
72 attributes #0 = { nounwind "target-features"="+wavefrontsize32" }
|
|
73 attributes #1 = { noinline nounwind "target-features"="+wavefrontsize64" }
|