[PATCH] D83637: [AMDGPU] Propagate dead flag during pre-RA exec mask optimizations

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 06:06:58 PDT 2020


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIOptimizeExecMaskingPreRA.cpp:172-173
           .addReg(CCReg, getUndefRegState(CC->isUndef()), CC->getSubReg());
+  if (MachineOperand *Andn2SCC = Andn2->findRegisterDefOperand(AMDGPU::SCC))
+    Andn2SCC->setIsDead(AndSCCIsDead);
   And->eraseFromParent();
----------------
You know the exact 2 opcodes here, so you can just hardcode the scc index (which I think is just the last operand in both cases)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D83637/new/

https://reviews.llvm.org/D83637





More information about the llvm-commits mailing list