@@ -386,43 +386,13 @@ define amdgpu_kernel void @with_cast_call_with_private_to_flat_addrspacecast_cc_
386386
387387;; tests of addrspacecast in a constant
388388
389- define amdgpu_kernel void @with_global_to_flat_in_const () {
390- ; GFX9-LABEL: define amdgpu_kernel void @with_global_to_flat_in_const()
391- ; GFX9-SAME: #[[ATTR1_GFX9_NOFSI2]]
392- store i32 7 , ptr addrspace (0 ) addrspacecast (ptr addrspace (1 ) null to ptr addrspace (0 ))
393- ret void
394- }
395-
396- define amdgpu_kernel void @with_region_to_flat_in_const () {
397- ; GFX9-LABEL: define amdgpu_kernel void @with_region_to_flat_in_const()
398- ; GFX9-SAME: #[[ATTR1_GFX9_NOFSI2]]
399- store i32 7 , ptr addrspace (0 ) addrspacecast (ptr addrspace (2 ) null to ptr addrspace (0 ))
400- ret void
401- }
402-
403- define amdgpu_kernel void @with_local_to_flat_in_const () {
404- ; GFX9-LABEL: define amdgpu_kernel void @with_local_to_flat_in_const()
405- ; GFX9-SAME: #[[ATTR1_GFX9_NOFSI2]]
406- store i32 7 , ptr addrspace (0 ) addrspacecast (ptr addrspace (3 ) null to ptr addrspace (0 ))
407- ret void
408- }
409-
410- define amdgpu_kernel void @with_constant_to_flat_in_const () {
411- store i32 7 , ptr addrspace (0 ) addrspacecast (ptr addrspace (3 ) null to ptr addrspace (0 ))
412- ret void
413- }
414-
415- define amdgpu_kernel void @with_private_to_flat_in_const () {
416- ; GFX9-LABEL: define amdgpu_kernel void @with_private_to_flat_in_const()
417- ; GFX9-SAME: #[[ATTR3_GFX9_NO_NOFSI2:[0-9]+]]
418- store i32 7 , ptr addrspace (0 ) addrspacecast (ptr addrspace (5 ) null to ptr addrspace (0 ))
419- ret void
420- }
421-
422- define amdgpu_kernel void @call_with_private_to_flat_in_const () {
423- ; GFX9-LABEL: define amdgpu_kernel void @call_with_private_to_flat_in_const()
424- ; GFX9-SAME: #[[ATTR3_GFX9_NO_NOFSI2:[0-9]+]]
425- call void @with_private_to_flat_in_const ()
389+ define amdgpu_kernel void @private_constant_expression_use (ptr addrspace (1 ) nocapture %out ) {
390+ ; GFX9-LABEL: define amdgpu_kernel void @private_constant_expression_use(ptr addrspace(1) nocapture %out)
391+ ; GFX9-SAME: #[[ATTR3_GFX9_NO_NOFSI2]]
392+ ;
393+ ; GFX10-LABEL: define amdgpu_kernel void @private_constant_expression_use(ptr addrspace(1) nocapture %out)
394+ ; GFX10-SAME: #[[ATTR3_GFX10_NO_NOFSI2]]
395+ store volatile ptr addrspacecast (ptr addrspace (5 ) inttoptr (i32 123 to ptr addrspace (5 )) to ptr ), ptr addrspace (1 ) %out , align 8
426396 ret void
427397}
428398
0 commit comments