|
17 | 17 | // OPT: @__oclc_ABI_version = weak_odr hidden local_unnamed_addr addrspace(4) constant i32 500
|
18 | 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 | 19 | //.
|
| 20 | +__device__ void extern_func(); |
| 21 | + |
20 | 22 | // OPTNONE: Function Attrs: convergent mustprogress noinline nounwind optnone
|
21 | 23 | // OPTNONE-LABEL: define {{[^@]+}}@_Z4funcv
|
22 | 24 | // OPTNONE-SAME: () #[[ATTR0:[0-9]+]] {
|
23 | 25 | // OPTNONE-NEXT: entry:
|
| 26 | +// OPTNONE-NEXT: call void @_Z11extern_funcv() #[[ATTR3:[0-9]+]] |
24 | 27 | // OPTNONE-NEXT: ret void
|
25 | 28 | //
|
26 |
| -// OPT: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) |
| 29 | +// OPT: Function Attrs: convergent mustprogress nounwind |
27 | 30 | // OPT-LABEL: define {{[^@]+}}@_Z4funcv
|
28 | 31 | // OPT-SAME: () local_unnamed_addr #[[ATTR0:[0-9]+]] {
|
29 | 32 | // OPT-NEXT: entry:
|
| 33 | +// OPT-NEXT: tail call void @_Z11extern_funcv() #[[ATTR3:[0-9]+]] |
30 | 34 | // OPT-NEXT: ret void
|
31 | 35 | //
|
32 | 36 | __device__ void func() {
|
33 |
| - |
| 37 | + extern_func(); |
34 | 38 | }
|
35 | 39 |
|
36 | 40 | // OPTNONE: Function Attrs: convergent mustprogress noinline norecurse nounwind optnone
|
37 | 41 | // OPTNONE-LABEL: define {{[^@]+}}@_Z6kernelv
|
38 |
| -// OPTNONE-SAME: () #[[ATTR1:[0-9]+]] { |
| 42 | +// OPTNONE-SAME: () #[[ATTR2:[0-9]+]] { |
39 | 43 | // OPTNONE-NEXT: entry:
|
| 44 | +// OPTNONE-NEXT: call void @_Z11extern_funcv() #[[ATTR3]] |
40 | 45 | // OPTNONE-NEXT: ret void
|
41 | 46 | //
|
42 |
| -// OPT: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none) |
| 47 | +// OPT: Function Attrs: convergent mustprogress norecurse nounwind |
43 | 48 | // OPT-LABEL: define {{[^@]+}}@_Z6kernelv
|
44 |
| -// OPT-SAME: () local_unnamed_addr #[[ATTR1:[0-9]+]] { |
| 49 | +// OPT-SAME: () local_unnamed_addr #[[ATTR2:[0-9]+]] { |
45 | 50 | // OPT-NEXT: entry:
|
| 51 | +// OPT-NEXT: tail call void @_Z11extern_funcv() #[[ATTR3]] |
46 | 52 | // OPT-NEXT: ret void
|
47 | 53 | //
|
48 | 54 | __global__ void kernel() {
|
49 |
| - |
| 55 | + extern_func(); |
50 | 56 | }
|
51 | 57 | //.
|
52 | 58 | // OPTNONE: attributes #[[ATTR0]] = { convergent mustprogress noinline nounwind optnone "no-trapping-math"="true" "stack-protector-buffer-size"="8" }
|
53 |
| -// OPTNONE: attributes #[[ATTR1]] = { 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" } |
| 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 } |
54 | 62 | //.
|
55 |
| -// OPT: attributes #[[ATTR0]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) "amdgpu-no-agpr" "amdgpu-no-completion-action" "amdgpu-no-default-queue" "amdgpu-no-dispatch-id" "amdgpu-no-dispatch-ptr" "amdgpu-no-heap-ptr" "amdgpu-no-hostcall-ptr" "amdgpu-no-implicitarg-ptr" "amdgpu-no-lds-kernel-id" "amdgpu-no-multigrid-sync-arg" "amdgpu-no-queue-ptr" "amdgpu-no-workgroup-id-x" "amdgpu-no-workgroup-id-y" "amdgpu-no-workgroup-id-z" "amdgpu-no-workitem-id-x" "amdgpu-no-workitem-id-y" "amdgpu-no-workitem-id-z" "amdgpu-waves-per-eu"="4,10" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "uniform-work-group-size"="false" } |
56 |
| -// OPT: attributes #[[ATTR1]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) "amdgpu-flat-work-group-size"="1,1024" "amdgpu-no-agpr" "amdgpu-no-completion-action" "amdgpu-no-default-queue" "amdgpu-no-dispatch-id" "amdgpu-no-dispatch-ptr" "amdgpu-no-heap-ptr" "amdgpu-no-hostcall-ptr" "amdgpu-no-implicitarg-ptr" "amdgpu-no-lds-kernel-id" "amdgpu-no-multigrid-sync-arg" "amdgpu-no-queue-ptr" "amdgpu-no-workgroup-id-x" "amdgpu-no-workgroup-id-y" "amdgpu-no-workgroup-id-z" "amdgpu-no-workitem-id-x" "amdgpu-no-workitem-id-y" "amdgpu-no-workitem-id-z" "no-trapping-math"="true" "stack-protector-buffer-size"="8" "uniform-work-group-size"="true" } |
| 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 } |
57 | 67 | //.
|
58 | 68 | // OPTNONE: [[META0:![0-9]+]] = !{i32 1, !"amdhsa_code_object_version", i32 500}
|
59 | 69 | // OPTNONE: [[META1:![0-9]+]] = !{i32 1, !"amdgpu_printf_kind", !"hostcall"}
|
|
0 commit comments