[llvm] AMDGPU: Assume true in getVOPNIsSingle helpers (PR #98516)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 11 11:50:52 PDT 2024
https://github.com/arsenm created https://github.com/llvm/llvm-project/pull/98516
If we have something we don't know what it is, we should conservatively
avoid printing an additional suffix. For isCodeGenOnly pseudoinstructions,
no encoded instruction is added to the tables this is queried, and the null
case would assume true.
This happens to fix the case I ran into, but this isn't a wholistic fix.
These really should be encoded directly in the TSFlags of the MCInstrDesc,
which would allow encoding pseudos to work correctly.
>From 29b93ba4c3f760359db1222f9db3c4871eab6ef4 Mon Sep 17 00:00:00 2001
From: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: Thu, 11 Jul 2024 22:47:05 +0400
Subject: [PATCH] AMDGPU: Assume true in getVOPNIsSingle helpers
If we have something we don't know what it is, we should conservatively
avoid printing an additional suffix. For isCodeGenOnly pseudoinstructions,
no encoded instruction is added to the tables this is queried, and the null
case would assume true.
This happens to fix the case I ran into, but this isn't a wholistic fix.
These really should be encoded directly in the TSFlags of the MCInstrDesc,
which would allow encoding pseudos to work correctly.
---
llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
index 9886235121d25..1b3cc4a83bea3 100644
--- a/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
+++ b/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp
@@ -496,17 +496,17 @@ bool getSMEMIsBuffer(unsigned Opc) {
bool getVOP1IsSingle(unsigned Opc) {
const VOPInfo *Info = getVOP1OpcodeHelper(Opc);
- return Info ? Info->IsSingle : false;
+ return Info ? Info->IsSingle : true;
}
bool getVOP2IsSingle(unsigned Opc) {
const VOPInfo *Info = getVOP2OpcodeHelper(Opc);
- return Info ? Info->IsSingle : false;
+ return Info ? Info->IsSingle : true;
}
bool getVOP3IsSingle(unsigned Opc) {
const VOPInfo *Info = getVOP3OpcodeHelper(Opc);
- return Info ? Info->IsSingle : false;
+ return Info ? Info->IsSingle : true;
}
bool isVOPC64DPP(unsigned Opc) {
More information about the llvm-commits
mailing list