[PATCH] D100969: [AMDGPU] SIWholeQuadMode: don't add duplicate implicit $exec operands
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 21 09:41:43 PDT 2021
foad created this revision.
foad added reviewers: critson, piotr.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, arsenm.
foad requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
STRICT_WWM and STRICT_WQM are already defined with Uses = [EXEC], so
there is no need to add another implicit use of $exec when lowering them
to V_MOV_B32 instructions.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D100969
Files:
llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
Index: llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
+++ llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp
@@ -1436,8 +1436,11 @@
const unsigned MovOp = TII->getMovOpcode(regClass);
MI->setDesc(TII->get(MovOp));
- // And make it implicitly depend on exec (like all VALU movs should do).
- MI->addOperand(MachineOperand::CreateReg(AMDGPU::EXEC, false, true));
+ // Check that it already implicitly depends on exec (like all VALU movs
+ // should do).
+ assert(any_of(MI->implicit_operands(), [](const MachineOperand &MO) {
+ return MO.isUse() && MO.getReg() == AMDGPU::EXEC;
+ }));
} else {
// Remove early-clobber and exec dependency from simple SGPR copies.
// This allows some to be eliminated during/post RA.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D100969.339277.patch
Type: text/x-patch
Size: 889 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210421/114fb800/attachment.bin>
More information about the llvm-commits
mailing list