[PATCH] D63731: [AMDGPU] Prevent VGPR copies from moving across the EXEC mask definitions
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 24 11:29:28 PDT 2019
arsenm added inline comments.
================
Comment at: lib/Target/AMDGPU/SIFoldOperands.cpp:502-508
+ MachineInstr::mop_iterator ImpOpI = UseMI->implicit_operands().begin();
+ MachineInstr::mop_iterator ImpOpE = UseMI->implicit_operands().end();
+ while (ImpOpI != ImpOpE) {
+ MachineInstr::mop_iterator Tmp = ImpOpI;
+ ImpOpI++;
+ UseMI->RemoveOperand(UseMI->getOperandNo(Tmp));
+ }
----------------
Blindly stripping off any implicit_operands could be error prone. We do use other implicit operands on V_MOV_B32 for indirect register indexing
================
Comment at: lib/Target/AMDGPU/SIInstrInfo.cpp:3923-3930
+ bool ImpDef = Def->isImplicitDef();
+ while (!ImpDef && Def && Def->isCopy()) {
+ Def = MRI.getUniqueVRegDef(Def->getOperand(1).getReg());
+ ImpDef = Def && Def->isImplicitDef();
+ }
+ if (!RI.isSGPRClass(DstRC) && !Copy->readsRegister(AMDGPU::EXEC, &RI) &&
+ !ImpDef)
----------------
I don't see why this is necessary
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63731/new/
https://reviews.llvm.org/D63731
More information about the llvm-commits
mailing list