[PATCH] D100188: [AMDGPU] SIFoldOperands: eagerly erase dead REG_SEQUENCEs

Stanislav Mekhanoshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 9 10:44:27 PDT 2021


rampitec accepted this revision.
rampitec added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/lib/Target/AMDGPU/SIFoldOperands.cpp:1547
   MachineInstr *UseMI = Op->getParent();
   while (UseMI->isCopy() && !Op->getSubReg()) {
     Reg = UseMI->getOperand(0).getReg();
----------------
foad wrote:
> Do we actually need to follow copies here? I don't see any lit tests regressions if I remove this loop.
The relevant test was in the acc-ldst.ll at least initially, all the subtests with loops. It was written to fold a store from LCSSA PHI. We had too many changes since then though so the test probably lost some of its value, but the code is still relevant.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D100188



More information about the llvm-commits mailing list