[PATCH] D79907: [AMDGPU] Peephole adjacent equivalent S_SET_GPR_IDX_ON
Stanislav Mekhanoshin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 13 15:16:54 PDT 2020
rampitec marked 2 inline comments as done.
rampitec added inline comments.
================
Comment at: llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp:152
+ MachineOperand *Idx = TII->getNamedOperand(MI, AMDGPU::OpName::src0);
+ Register IdxReg = Idx->isReg() ? Idx->getReg() : AMDGPU::NoRegister;
+ SmallVector<MachineInstr *, 4> ToRemove;
----------------
arsenm wrote:
> Register() instead of NoRegister. When does the NoRegister case happen?
I do not believe we produce it on practice, but operand is described as SSrc_b32 which may include an immediate. There is test for this in this change.
================
Comment at: llvm/lib/Target/AMDGPU/SIPreEmitPeephole.cpp:157-159
+ for (MachineBasicBlock::reverse_iterator
+ I = std::next(MI.getReverseIterator()),
+ E = MBB.rend(); I != E; ++I) {
----------------
arsenm wrote:
> Should have a search threshold
Sure. I also think I will invert and speedup scan a little.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79907/new/
https://reviews.llvm.org/D79907
More information about the llvm-commits
mailing list