[llvm] [AMDGPU] Skip debug instructions when eliminating S_SET_GPR_IDX_ON/OFF (PR #160715)
Jay Foad via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 26 01:38:34 PDT 2025
================
@@ -299,7 +299,7 @@ bool SIPreEmitPeephole::optimizeSetGPR(MachineInstr &First,
for (MachineBasicBlock::instr_iterator I = std::next(First.getIterator()),
E = MI.getIterator();
I != E; ++I) {
- if (I->isBundle())
+ if (I->isBundle() || I->isDebugInstr())
----------------
jayfoad wrote:
You're right, I was confused. Added a test for IMPLICIT_DEF.
However, on reflection, I don't think explicitly skipping all meta instructions here is a good idea. Irrelevant instructions are already skipped below based on their operands, and I'm testing that this works for some meta instructions. Explicitly skipping all meta instructions seems unnecessary and possibly wrong.
https://github.com/llvm/llvm-project/pull/160715
More information about the llvm-commits
mailing list