[llvm] [AMDGPU][LIT][NFC] Adding -mtriple for AMDGPUAnnotateUniformValues Pass tests (PR #156437)

Sameer Sahasrabuddhe via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 2 07:15:07 PDT 2025


================
@@ -24,7 +24,7 @@ declare i32 @llvm.amdgcn.workitem.id.x()
 ; To check that %arrayidx0 is not marked as amdgpu.noclobber.
 
 ; OPT-LABEL: @atomicrmw_clobbers_load(
-; OPT:       %arrayidx0 = getelementptr inbounds [512 x i32], ptr addrspace(3) @lds0, i32 0, i32 %idx.0, !amdgpu.uniform !0
+; OPT:       %arrayidx0 = getelementptr inbounds [512 x i32], ptr addrspace(3) @lds0, i32 0, i32 %idx.0
----------------
ssahasra wrote:

> But previously without the TargetMachine it wasn't adding the metadata, and now it isn't with the triple

I think you meant that previously it _wasn't_ and now it _is_. That's the point. Without specifying the target, this test was not being compiled for AMDGPU, and UA was trivially returning "uniform" for all operations. That resulted in incorrect metadata. Now with the triple, the test is correctly compiled for AMDGPU, and UA is returning actual uniformity information, thus eliminating the incorrect metadata.

https://github.com/llvm/llvm-project/pull/156437


More information about the llvm-commits mailing list