|
8 | 8 | #define __device__ __attribute__((device))
|
9 | 9 | #define __global__ __attribute__((global))
|
10 | 10 |
|
11 |
| -//. |
12 |
| -// OPTNONE: @__hip_cuid_ = addrspace(1) global i8 0 |
13 |
| -// OPTNONE: @llvm.compiler.used = appending addrspace(1) global [1 x ptr] [ptr addrspacecast (ptr addrspace(1) @__hip_cuid_ to ptr)], section "llvm.metadata" |
14 |
| -// OPTNONE: @__oclc_ABI_version = weak_odr hidden local_unnamed_addr addrspace(4) constant i32 500 |
15 |
| -//. |
16 |
| -// OPT: @__hip_cuid_ = addrspace(1) global i8 0 |
17 |
| -// OPT: @__oclc_ABI_version = weak_odr hidden local_unnamed_addr addrspace(4) constant i32 500 |
18 |
| -// OPT: @llvm.compiler.used = appending addrspace(1) global [1 x ptr] [ptr addrspacecast (ptr addrspace(1) @__hip_cuid_ to ptr)], section "llvm.metadata" |
19 |
| -//. |
20 |
| -__device__ void extern_func(); |
21 |
| - |
22 | 11 | // OPTNONE: Function Attrs: convergent mustprogress noinline nounwind optnone
|
23 | 12 | // OPTNONE-LABEL: define {{[^@]+}}@_Z4funcv
|
24 | 13 | // OPTNONE-SAME: () #[[ATTR0:[0-9]+]] {
|
25 | 14 | // OPTNONE-NEXT: entry:
|
26 |
| -// OPTNONE-NEXT: call void @_Z11extern_funcv() #[[ATTR3:[0-9]+]] |
27 | 15 | // OPTNONE-NEXT: ret void
|
28 | 16 | //
|
29 |
| -// OPT: Function Attrs: convergent mustprogress nounwind |
| 17 | +// OPT: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) |
30 | 18 | // OPT-LABEL: define {{[^@]+}}@_Z4funcv
|
31 | 19 | // OPT-SAME: () local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
32 | 20 | // OPT-NEXT: entry:
|
33 |
| -// OPT-NEXT: tail call void @_Z11extern_funcv() #[[ATTR3:[0-9]+]] |
34 | 21 | // OPT-NEXT: ret void
|
35 | 22 | //
|
36 | 23 | __device__ void func() {
|
37 |
| - extern_func(); |
| 24 | + |
38 | 25 | }
|
39 | 26 |
|
40 | 27 | // OPTNONE: Function Attrs: convergent mustprogress noinline norecurse nounwind optnone
|
41 | 28 | // OPTNONE-LABEL: define {{[^@]+}}@_Z6kernelv
|
42 |
| -// OPTNONE-SAME: () #[[ATTR2:[0-9]+]] { |
| 29 | +// OPTNONE-SAME: () #[[ATTR1:[0-9]+]] { |
43 | 30 | // OPTNONE-NEXT: entry:
|
44 |
| -// OPTNONE-NEXT: call void @_Z11extern_funcv() #[[ATTR3]] |
45 | 31 | // OPTNONE-NEXT: ret void
|
46 | 32 | //
|
47 |
| -// OPT: Function Attrs: convergent mustprogress norecurse nounwind |
| 33 | +// OPT: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) |
48 | 34 | // OPT-LABEL: define {{[^@]+}}@_Z6kernelv
|
49 |
| -// OPT-SAME: () local_unnamed_addr #[[ATTR2:[0-9]+]] { |
| 35 | +// OPT-SAME: () local_unnamed_addr #[[ATTR1:[0-9]+]] { |
50 | 36 | // OPT-NEXT: entry:
|
51 |
| -// OPT-NEXT: tail call void @_Z11extern_funcv() #[[ATTR3]] |
52 | 37 | // OPT-NEXT: ret void
|
53 | 38 | //
|
54 | 39 | __global__ void kernel() {
|
55 |
| - extern_func(); |
| 40 | + |
56 | 41 | }
|
57 | 42 | //.
|
58 |
| -// OPTNONE: attributes #[[ATTR0]] = { convergent mustprogress noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" } |
59 |
| -// OPTNONE: attributes #[[ATTR1:[0-9]+]] = { convergent nounwind "no-trapping-math"="true" "stack-protector-buffer-size"="8" } |
60 |
| -// OPTNONE: attributes #[[ATTR2]] = { convergent mustprogress noinline norecurse nounwind optnone "amdgpu-flat-work-group-size"="1,1024" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "uniform-work-group-size"="true" } |
61 |
| -// OPTNONE: attributes #[[ATTR3]] = { convergent nounwind } |
| 43 | +// OPTNONE: attributes #0 = { convergent mustprogress noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" } |
| 44 | +// OPTNONE: attributes #1 = { convergent mustprogress noinline norecurse nounwind optnone "amdgpu-flat-work-group-size"="1,1024" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "uniform-work-group-size"="true" } |
62 | 45 | //.
|
63 |
| -// OPT: attributes #[[ATTR0]] = { convergent mustprogress nounwind "amdgpu-waves-per-eu"="4,10" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "uniform-work-group-size"="false" } |
64 |
| -// OPT: attributes #[[ATTR1:[0-9]+]] = { convergent nounwind "amdgpu-waves-per-eu"="4,10" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "uniform-work-group-size"="false" } |
65 |
| -// OPT: attributes #[[ATTR2]] = { convergent mustprogress norecurse nounwind "amdgpu-flat-work-group-size"="1,1024" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "uniform-work-group-size"="true" } |
66 |
| -// OPT: attributes #[[ATTR3]] = { convergent nounwind } |
| 46 | +// OPT: attributes #0 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) "no-trapping-math"="true" "stack-protector-buffer-size"="8" } |
| 47 | +// OPT: attributes #1 = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) "amdgpu-flat-work-group-size"="1,1024" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "uniform-work-group-size"="true" } |
67 | 48 | //.
|
68 |
| -// OPTNONE: [[META0:![0-9]+]] = !{i32 1, !"amdhsa_code_object_version", i32 500} |
69 |
| -// OPTNONE: [[META1:![0-9]+]] = !{i32 1, !"amdgpu_printf_kind", !"hostcall"} |
70 |
| -// OPTNONE: [[META2:![0-9]+]] = !{i32 1, !"wchar_size", i32 4} |
| 49 | +// OPTNONE: !0 = !{i32 1, !"amdhsa_code_object_version", i32 500} |
| 50 | +// OPTNONE: !1 = !{i32 1, !"amdgpu_printf_kind", !"hostcall"} |
| 51 | +// OPTNONE: !2 = !{i32 1, !"wchar_size", i32 4} |
71 | 52 | //.
|
72 |
| -// OPT: [[META0:![0-9]+]] = !{i32 1, !"amdhsa_code_object_version", i32 500} |
73 |
| -// OPT: [[META1:![0-9]+]] = !{i32 1, !"amdgpu_printf_kind", !"hostcall"} |
74 |
| -// OPT: [[META2:![0-9]+]] = !{i32 1, !"wchar_size", i32 4} |
| 53 | +// OPT: !0 = !{i32 1, !"amdhsa_code_object_version", i32 500} |
| 54 | +// OPT: !1 = !{i32 1, !"amdgpu_printf_kind", !"hostcall"} |
| 55 | +// OPT: !2 = !{i32 1, !"wchar_size", i32 4} |
75 | 56 | //.
|
0 commit comments