[PATCH] D101405: [AMDGPU] Change FLAT SADDR to VADDR form in moveToVALU
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 29 18:54:08 PDT 2021
rampitec added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIInstrInfo.cpp:5049-5063
+ if (OldVAddrIdx == NewVAddrIdx) {
+ assert(OldVAddrIdx == NewVAddrIdx);
+ MachineOperand &NewVAddr = Inst.getOperand(NewVAddrIdx);
+ MRI.removeRegOperandFromUseList(&NewVAddr);
+ MRI.moveOperands(&NewVAddr, &SAddr, 1);
+ Inst.RemoveOperand(OldSAddrIdx);
+ MRI.removeRegOperandFromUseList(&NewVAddr);
----------------
arsenm wrote:
> At this point wouldn't it be simpler to just create a fresh new instruction and delete the old one?
Unfortunately callers expect iterator to be intact. Otherwise probably yes, although it would not be less code.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101405/new/
https://reviews.llvm.org/D101405
More information about the llvm-commits
mailing list