[llvm] [AMDGPU] Do not run GCNNSAReassign pass for GFX12 (PR #78185)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 15 08:43:11 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-backend-amdgpu

Author: Jay Foad (jayfoad)

<details>
<summary>Changes</summary>

GFX12 does not have separate NSA and non-NSA encodings.


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


1 Files Affected:

- (modified) llvm/lib/Target/AMDGPU/GCNNSAReassign.cpp (+1-1) 


``````````diff
diff --git a/llvm/lib/Target/AMDGPU/GCNNSAReassign.cpp b/llvm/lib/Target/AMDGPU/GCNNSAReassign.cpp
index 4c9ad9b5bcf757..f87ff2d407e145 100644
--- a/llvm/lib/Target/AMDGPU/GCNNSAReassign.cpp
+++ b/llvm/lib/Target/AMDGPU/GCNNSAReassign.cpp
@@ -237,7 +237,7 @@ GCNNSAReassign::CheckNSA(const MachineInstr &MI, bool Fast) const {
 
 bool GCNNSAReassign::runOnMachineFunction(MachineFunction &MF) {
   ST = &MF.getSubtarget<GCNSubtarget>();
-  if (!ST->hasNSAEncoding())
+  if (!ST->hasNSAEncoding() || ST->getGeneration() > GCNSubtarget::GFX11)
     return false;
 
   MRI = &MF.getRegInfo();

``````````

</details>


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


More information about the llvm-commits mailing list