[PATCH] D140918: [AMDGPU] Fix useDeprecatedPositionallyEncodedOperands errors.
James Y Knight via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 3 12:42:27 PST 2023
jyknight created this revision.
jyknight added a reviewer: arsenm.
Herald added subscribers: kosarev, foad, kerbowa, hiraditya, kristof.beyls, tpr, dstuttard, yaxunl, jvesely, kzhuravl.
Herald added a project: All.
jyknight requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
This is a follow-on to https://reviews.llvm.org/D134073.
The errors in the R600 half were fixed previously in
https://reviews.llvm.org/D134078. Originally, I thought that the fixes
to the AMDGPU half would be tricky, but upon taking another look,
there were only a couple minor issues that needed fixing:
1. Previously, buffer load instructions (`BUFFER_LOAD_*_LDS_*`) were
populating the `vdata` field in the instruction from the `swz`
operand. This was incorrect, but harmless, as when the LDS option is
set, the instruction does not use the vdata field.
2. The `BUFFER_STORE_LDS_DWORD_gfx90a` instruction was populating
`acc` from the `swz` operand, because `acc` was set to `?`. (I believe
that the intent here was to leave the instruction bit as an "unknown
value", but you can't do that except by setting the bits on `Inst`
directly). Also harmless, for the same reason.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D140918
Files:
llvm/lib/Target/AMDGPU/AMDGPU.td
llvm/lib/Target/AMDGPU/BUFInstructions.td
Index: llvm/lib/Target/AMDGPU/BUFInstructions.td
===================================================================
--- llvm/lib/Target/AMDGPU/BUFInstructions.td
+++ llvm/lib/Target/AMDGPU/BUFInstructions.td
@@ -366,7 +366,7 @@
// GFX90A+ only: instruction uses AccVGPR for data
// Bit supersedes tfe.
- bits<1> acc = !if(ps.has_vdata, vdata{9}, !if(ps.lds, ?, 0));
+ bits<1> acc = !if(ps.has_vdata, vdata{9}, 0);
}
@@ -509,7 +509,7 @@
let Constraints = !if(HasTiedDest, "$vdata = $vdata_in", "");
let LGKM_CNT = isLds;
- let has_vdata = !not(isLdsOpc);
+ let has_vdata = !not(!or(isLds, isLdsOpc));
let mayLoad = 1;
let mayStore = isLds;
let maybeAtomic = 1;
Index: llvm/lib/Target/AMDGPU/AMDGPU.td
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPU.td
+++ llvm/lib/Target/AMDGPU/AMDGPU.td
@@ -1329,8 +1329,6 @@
def AMDGPUInstrInfo : InstrInfo {
let guessInstructionProperties = 1;
- let noNamedPositionallyEncodedOperands = 1;
- let useDeprecatedPositionallyEncodedOperands = 1;
}
def AMDGPUAsmParser : AsmParser {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D140918.486056.patch
Type: text/x-patch
Size: 1115 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230103/7ba510f1/attachment.bin>
More information about the llvm-commits
mailing list