[PATCH] D90596: [AMDGPU] Fix iterating in SIFixSGPRCopies
Sebastian Neubauer via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 3 05:13:46 PST 2020
sebastian-ne added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp:653-654
TII->moveToVALU(MI, MDT);
+ MBB = I->getParent();
+ E = MBB->end();
} else if (isSGPRToVGPRCopy(SrcRC, DstRC, *TRI)) {
----------------
arsenm wrote:
> I'm not sure this is an entirely reliable way to get the parent if the instruction was erased (I guess this doesn't happen for any of the copy-like cases). Other places that change the control flow in situations like this return the new block from the modifying function and check if it matches the original
That means `loadSRsrcFromVGPR`, `SIInstrInfo::legalizeOperands` and `SIInstrInfo::moveToVALU` should return the newly created basic block?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90596/new/
https://reviews.llvm.org/D90596
More information about the llvm-commits
mailing list