[llvm] [AMDGPU] Do not run GCNNSAReassign pass for GFX12 (PR #78185)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 15 08:42:42 PST 2024
https://github.com/jayfoad created https://github.com/llvm/llvm-project/pull/78185
GFX12 does not have separate NSA and non-NSA encodings.
>From 1eac82e1f04ed3036fcc62609bff86556d6cc93a Mon Sep 17 00:00:00 2001
From: Mirko Brkusanin <Mirko.Brkusanin at amd.com>
Date: Fri, 17 Mar 2023 17:50:39 +0100
Subject: [PATCH] [AMDGPU] Do not run GCNNSAReassign pass for GFX12
GFX12 does not have separate NSA and non-NSA encodings.
---
llvm/lib/Target/AMDGPU/GCNNSAReassign.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/lib/Target/AMDGPU/GCNNSAReassign.cpp b/llvm/lib/Target/AMDGPU/GCNNSAReassign.cpp
index 4c9ad9b5bcf7574..f87ff2d407e1457 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();
More information about the llvm-commits
mailing list