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

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 3 09:04:38 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-amdgpu

Author: Vikash Gupta (vg0204)

<details>
<summary>Changes</summary>

It specifies the target machine as AMDGPU for AMDGPUAnnotateUniformValues pass-related test (that uses UA). Before in its absense, the UA would consider everything Uniform resulting in setting metadata incorrectly for AMDGPU. Now, after specifying the AMDGPU, the UA would be rightful sets the right metadata as the test gets commpiled for AMDGPU.

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


1 Files Affected:

- (modified) llvm/test/CodeGen/AMDGPU/store-clobbers-load.ll (+2-2) 


``````````diff
diff --git a/llvm/test/CodeGen/AMDGPU/store-clobbers-load.ll b/llvm/test/CodeGen/AMDGPU/store-clobbers-load.ll
index f4947f6229dea..786f44dc220f1 100644
--- a/llvm/test/CodeGen/AMDGPU/store-clobbers-load.ll
+++ b/llvm/test/CodeGen/AMDGPU/store-clobbers-load.ll
@@ -1,4 +1,4 @@
-; RUN: opt -S --amdgpu-annotate-uniform < %s | FileCheck -check-prefix=OPT %s
+; RUN: opt -S -mtriple=amdgcn-amd-amdhsa --amdgpu-annotate-uniform < %s | FileCheck -check-prefix=OPT %s
 
 ; "load vaddr" depends on the store, so we should not mark vaddr as amdgpu.noclobber.
 
@@ -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
 ; OPT-NEXT:  %val = atomicrmw xchg ptr addrspace(3) %arrayidx0, i32 3 seq_cst
 
 define amdgpu_kernel void @atomicrmw_clobbers_load(ptr addrspace(1) %out0, ptr addrspace(1) %out1) {

``````````

</details>


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


More information about the llvm-commits mailing list