@@ -44,13 +44,13 @@ define void @with_global_to_flat_addrspacecast(ptr addrspace(1) %ptr) {
4444; GFX9-LABEL: define void @with_global_to_flat_addrspacecast(
4545; GFX9-SAME: ptr addrspace(1) [[PTR:%.*]]) #[[ATTR0]] {
4646; GFX9-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(1) [[PTR]] to ptr
47- ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4
47+ ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META0:![0-9]+]]
4848; GFX9-NEXT: ret void
4949;
5050; GFX10-LABEL: define void @with_global_to_flat_addrspacecast(
5151; GFX10-SAME: ptr addrspace(1) [[PTR:%.*]]) #[[ATTR0]] {
5252; GFX10-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(1) [[PTR]] to ptr
53- ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4
53+ ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META0:![0-9]+]]
5454; GFX10-NEXT: ret void
5555;
5656 %stof = addrspacecast ptr addrspace (1 ) %ptr to ptr
@@ -62,13 +62,13 @@ define amdgpu_kernel void @with_global_to_flat_addrspacecast_cc_kernel(ptr addrs
6262; GFX9-LABEL: define amdgpu_kernel void @with_global_to_flat_addrspacecast_cc_kernel(
6363; GFX9-SAME: ptr addrspace(1) [[PTR:%.*]]) #[[ATTR0]] {
6464; GFX9-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(1) [[PTR]] to ptr
65- ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4
65+ ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META0]]
6666; GFX9-NEXT: ret void
6767;
6868; GFX10-LABEL: define amdgpu_kernel void @with_global_to_flat_addrspacecast_cc_kernel(
6969; GFX10-SAME: ptr addrspace(1) [[PTR:%.*]]) #[[ATTR0]] {
7070; GFX10-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(1) [[PTR]] to ptr
71- ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4
71+ ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META0]]
7272; GFX10-NEXT: ret void
7373;
7474 %stof = addrspacecast ptr addrspace (1 ) %ptr to ptr
@@ -110,13 +110,13 @@ define void @with_region_to_flat_addrspacecast(ptr addrspace(2) %ptr) {
110110; GFX9-LABEL: define void @with_region_to_flat_addrspacecast(
111111; GFX9-SAME: ptr addrspace(2) [[PTR:%.*]]) #[[ATTR0]] {
112112; GFX9-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(2) [[PTR]] to ptr
113- ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4
113+ ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META1:![0-9]+]]
114114; GFX9-NEXT: ret void
115115;
116116; GFX10-LABEL: define void @with_region_to_flat_addrspacecast(
117117; GFX10-SAME: ptr addrspace(2) [[PTR:%.*]]) #[[ATTR0]] {
118118; GFX10-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(2) [[PTR]] to ptr
119- ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4
119+ ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META1:![0-9]+]]
120120; GFX10-NEXT: ret void
121121;
122122 %stof = addrspacecast ptr addrspace (2 ) %ptr to ptr
@@ -128,13 +128,13 @@ define amdgpu_kernel void @with_region_to_flat_addrspacecast_cc_kernel(ptr addrs
128128; GFX9-LABEL: define amdgpu_kernel void @with_region_to_flat_addrspacecast_cc_kernel(
129129; GFX9-SAME: ptr addrspace(2) [[PTR:%.*]]) #[[ATTR0]] {
130130; GFX9-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(2) [[PTR]] to ptr
131- ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4
131+ ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META1]]
132132; GFX9-NEXT: ret void
133133;
134134; GFX10-LABEL: define amdgpu_kernel void @with_region_to_flat_addrspacecast_cc_kernel(
135135; GFX10-SAME: ptr addrspace(2) [[PTR:%.*]]) #[[ATTR0]] {
136136; GFX10-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(2) [[PTR]] to ptr
137- ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4
137+ ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META1]]
138138; GFX10-NEXT: ret void
139139;
140140 %stof = addrspacecast ptr addrspace (2 ) %ptr to ptr
@@ -176,13 +176,13 @@ define void @with_group_to_flat_addrspacecast(ptr addrspace(3) %ptr) {
176176; GFX9-LABEL: define void @with_group_to_flat_addrspacecast(
177177; GFX9-SAME: ptr addrspace(3) [[PTR:%.*]]) #[[ATTR0]] {
178178; GFX9-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(3) [[PTR]] to ptr
179- ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4
179+ ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META2:![0-9]+]]
180180; GFX9-NEXT: ret void
181181;
182182; GFX10-LABEL: define void @with_group_to_flat_addrspacecast(
183183; GFX10-SAME: ptr addrspace(3) [[PTR:%.*]]) #[[ATTR0]] {
184184; GFX10-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(3) [[PTR]] to ptr
185- ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4
185+ ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META2:![0-9]+]]
186186; GFX10-NEXT: ret void
187187;
188188 %stof = addrspacecast ptr addrspace (3 ) %ptr to ptr
@@ -194,13 +194,13 @@ define amdgpu_kernel void @with_group_to_flat_addrspacecast_cc_kernel(ptr addrsp
194194; GFX9-LABEL: define amdgpu_kernel void @with_group_to_flat_addrspacecast_cc_kernel(
195195; GFX9-SAME: ptr addrspace(3) [[PTR:%.*]]) #[[ATTR0]] {
196196; GFX9-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(3) [[PTR]] to ptr
197- ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4
197+ ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META2]]
198198; GFX9-NEXT: ret void
199199;
200200; GFX10-LABEL: define amdgpu_kernel void @with_group_to_flat_addrspacecast_cc_kernel(
201201; GFX10-SAME: ptr addrspace(3) [[PTR:%.*]]) #[[ATTR0]] {
202202; GFX10-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(3) [[PTR]] to ptr
203- ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4
203+ ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META2]]
204204; GFX10-NEXT: ret void
205205;
206206 %stof = addrspacecast ptr addrspace (3 ) %ptr to ptr
@@ -242,13 +242,13 @@ define void @with_constant_to_flat_addrspacecast(ptr addrspace(4) %ptr) {
242242; GFX9-LABEL: define void @with_constant_to_flat_addrspacecast(
243243; GFX9-SAME: ptr addrspace(4) [[PTR:%.*]]) #[[ATTR0]] {
244244; GFX9-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(4) [[PTR]] to ptr
245- ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4
245+ ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META3:![0-9]+]]
246246; GFX9-NEXT: ret void
247247;
248248; GFX10-LABEL: define void @with_constant_to_flat_addrspacecast(
249249; GFX10-SAME: ptr addrspace(4) [[PTR:%.*]]) #[[ATTR0]] {
250250; GFX10-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(4) [[PTR]] to ptr
251- ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4
251+ ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META3:![0-9]+]]
252252; GFX10-NEXT: ret void
253253;
254254 %stof = addrspacecast ptr addrspace (4 ) %ptr to ptr
@@ -260,13 +260,13 @@ define amdgpu_kernel void @with_constant_to_flat_addrspacecast_cc_kernel(ptr add
260260; GFX9-LABEL: define amdgpu_kernel void @with_constant_to_flat_addrspacecast_cc_kernel(
261261; GFX9-SAME: ptr addrspace(4) [[PTR:%.*]]) #[[ATTR0]] {
262262; GFX9-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(4) [[PTR]] to ptr
263- ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4
263+ ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META3]]
264264; GFX9-NEXT: ret void
265265;
266266; GFX10-LABEL: define amdgpu_kernel void @with_constant_to_flat_addrspacecast_cc_kernel(
267267; GFX10-SAME: ptr addrspace(4) [[PTR:%.*]]) #[[ATTR0]] {
268268; GFX10-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(4) [[PTR]] to ptr
269- ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4
269+ ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META3]]
270270; GFX10-NEXT: ret void
271271;
272272 %stof = addrspacecast ptr addrspace (4 ) %ptr to ptr
@@ -308,13 +308,13 @@ define void @with_private_to_flat_addrspacecast(ptr addrspace(5) %ptr) {
308308; GFX9-LABEL: define void @with_private_to_flat_addrspacecast(
309309; GFX9-SAME: ptr addrspace(5) [[PTR:%.*]]) #[[ATTR1:[0-9]+]] {
310310; GFX9-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(5) [[PTR]] to ptr
311- ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4
311+ ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META4:![0-9]+]]
312312; GFX9-NEXT: ret void
313313;
314314; GFX10-LABEL: define void @with_private_to_flat_addrspacecast(
315315; GFX10-SAME: ptr addrspace(5) [[PTR:%.*]]) #[[ATTR1:[0-9]+]] {
316316; GFX10-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(5) [[PTR]] to ptr
317- ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4
317+ ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META4:![0-9]+]]
318318; GFX10-NEXT: ret void
319319;
320320 %stof = addrspacecast ptr addrspace (5 ) %ptr to ptr
@@ -326,13 +326,13 @@ define amdgpu_kernel void @with_private_to_flat_addrspacecast_cc_kernel(ptr addr
326326; GFX9-LABEL: define amdgpu_kernel void @with_private_to_flat_addrspacecast_cc_kernel(
327327; GFX9-SAME: ptr addrspace(5) [[PTR:%.*]]) #[[ATTR1]] {
328328; GFX9-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(5) [[PTR]] to ptr
329- ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4
329+ ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META4]]
330330; GFX9-NEXT: ret void
331331;
332332; GFX10-LABEL: define amdgpu_kernel void @with_private_to_flat_addrspacecast_cc_kernel(
333333; GFX10-SAME: ptr addrspace(5) [[PTR:%.*]]) #[[ATTR1]] {
334334; GFX10-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(5) [[PTR]] to ptr
335- ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4
335+ ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META4]]
336336; GFX10-NEXT: ret void
337337;
338338 %stof = addrspacecast ptr addrspace (5 ) %ptr to ptr
@@ -530,14 +530,14 @@ define void @with_cast_call_without_private_to_flat_addrspacecast(ptr addrspace(
530530; GFX9-LABEL: define void @with_cast_call_without_private_to_flat_addrspacecast(
531531; GFX9-SAME: ptr addrspace(5) [[PTR:%.*]]) #[[ATTR1]] {
532532; GFX9-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(5) [[PTR]] to ptr
533- ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4
533+ ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META4]]
534534; GFX9-NEXT: call void @without_private_to_flat_addrspacecast(ptr addrspace(5) [[PTR]])
535535; GFX9-NEXT: ret void
536536;
537537; GFX10-LABEL: define void @with_cast_call_without_private_to_flat_addrspacecast(
538538; GFX10-SAME: ptr addrspace(5) [[PTR:%.*]]) #[[ATTR1]] {
539539; GFX10-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(5) [[PTR]] to ptr
540- ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4
540+ ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META4]]
541541; GFX10-NEXT: call void @without_private_to_flat_addrspacecast(ptr addrspace(5) [[PTR]])
542542; GFX10-NEXT: ret void
543543;
@@ -551,14 +551,14 @@ define amdgpu_kernel void @with_cast_call_without_private_to_flat_addrspacecast_
551551; GFX9-LABEL: define amdgpu_kernel void @with_cast_call_without_private_to_flat_addrspacecast_cc_kernel(
552552; GFX9-SAME: ptr addrspace(5) [[PTR:%.*]]) #[[ATTR1]] {
553553; GFX9-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(5) [[PTR]] to ptr
554- ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4
554+ ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META4]]
555555; GFX9-NEXT: call void @without_private_to_flat_addrspacecast(ptr addrspace(5) [[PTR]])
556556; GFX9-NEXT: ret void
557557;
558558; GFX10-LABEL: define amdgpu_kernel void @with_cast_call_without_private_to_flat_addrspacecast_cc_kernel(
559559; GFX10-SAME: ptr addrspace(5) [[PTR:%.*]]) #[[ATTR1]] {
560560; GFX10-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(5) [[PTR]] to ptr
561- ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4
561+ ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META4]]
562562; GFX10-NEXT: call void @without_private_to_flat_addrspacecast(ptr addrspace(5) [[PTR]])
563563; GFX10-NEXT: ret void
564564;
@@ -572,14 +572,14 @@ define void @with_cast_call_with_private_to_flat_addrspacecast(ptr addrspace(5)
572572; GFX9-LABEL: define void @with_cast_call_with_private_to_flat_addrspacecast(
573573; GFX9-SAME: ptr addrspace(5) [[PTR:%.*]]) #[[ATTR1]] {
574574; GFX9-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(5) [[PTR]] to ptr
575- ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4
575+ ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META4]]
576576; GFX9-NEXT: call void @with_private_to_flat_addrspacecast(ptr addrspace(5) [[PTR]])
577577; GFX9-NEXT: ret void
578578;
579579; GFX10-LABEL: define void @with_cast_call_with_private_to_flat_addrspacecast(
580580; GFX10-SAME: ptr addrspace(5) [[PTR:%.*]]) #[[ATTR1]] {
581581; GFX10-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(5) [[PTR]] to ptr
582- ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4
582+ ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META4]]
583583; GFX10-NEXT: call void @with_private_to_flat_addrspacecast(ptr addrspace(5) [[PTR]])
584584; GFX10-NEXT: ret void
585585;
@@ -593,14 +593,14 @@ define amdgpu_kernel void @with_cast_call_with_private_to_flat_addrspacecast_cc_
593593; GFX9-LABEL: define amdgpu_kernel void @with_cast_call_with_private_to_flat_addrspacecast_cc_kernel(
594594; GFX9-SAME: ptr addrspace(5) [[PTR:%.*]]) #[[ATTR1]] {
595595; GFX9-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(5) [[PTR]] to ptr
596- ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4
596+ ; GFX9-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META4]]
597597; GFX9-NEXT: call void @with_private_to_flat_addrspacecast(ptr addrspace(5) [[PTR]])
598598; GFX9-NEXT: ret void
599599;
600600; GFX10-LABEL: define amdgpu_kernel void @with_cast_call_with_private_to_flat_addrspacecast_cc_kernel(
601601; GFX10-SAME: ptr addrspace(5) [[PTR:%.*]]) #[[ATTR1]] {
602602; GFX10-NEXT: [[STOF:%.*]] = addrspacecast ptr addrspace(5) [[PTR]] to ptr
603- ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4
603+ ; GFX10-NEXT: store volatile i32 0, ptr [[STOF]], align 4, !noalias.addrspace [[META4]]
604604; GFX10-NEXT: call void @with_private_to_flat_addrspacecast(ptr addrspace(5) [[PTR]])
605605; GFX10-NEXT: ret void
606606;
@@ -879,3 +879,15 @@ define amdgpu_kernel void @with_inline_asm() {
879879; GFX10: attributes #[[ATTR4:[0-9]+]] = { nocallback nofree nosync nounwind speculatable willreturn memory(none) "target-cpu"="gfx1010" }
880880; GFX10: attributes #[[ATTR5]] = { "amdgpu-agpr-alloc"="0" "amdgpu-no-completion-action" "amdgpu-no-default-queue" "amdgpu-no-dispatch-id" "amdgpu-no-dispatch-ptr" "amdgpu-no-flat-scratch-init" "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-y" "amdgpu-no-workitem-id-z" "amdgpu-waves-per-eu"="8,20" "target-cpu"="gfx1010" "uniform-work-group-size"="false" }
881881;.
882+ ; GFX9: [[META0]] = !{i32 2, i32 10}
883+ ; GFX9: [[META1]] = !{i32 1, i32 2, i32 3, i32 10}
884+ ; GFX9: [[META2]] = !{i32 1, i32 3, i32 4, i32 10}
885+ ; GFX9: [[META3]] = !{i32 1, i32 4, i32 5, i32 10}
886+ ; GFX9: [[META4]] = !{i32 1, i32 5, i32 6, i32 10}
887+ ;.
888+ ; GFX10: [[META0]] = !{i32 2, i32 10}
889+ ; GFX10: [[META1]] = !{i32 1, i32 2, i32 3, i32 10}
890+ ; GFX10: [[META2]] = !{i32 1, i32 3, i32 4, i32 10}
891+ ; GFX10: [[META3]] = !{i32 1, i32 4, i32 5, i32 10}
892+ ; GFX10: [[META4]] = !{i32 1, i32 5, i32 6, i32 10}
893+ ;.
0 commit comments