[llvm] [AMDGPU] Analyze REG_SEQUENCE To Remove Redundant CMP Instructions (PR #167364)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 29 08:50:52 PDT 2026
================
@@ -11267,10 +11304,103 @@ bool SIInstrInfo::optimizeCompareInstr(MachineInstr &CmpInstr, Register SrcReg,
if (!SrcReg || SrcReg.isPhysical())
return false;
- if (SrcReg2 && !getFoldableImm(SrcReg2, *MRI, CmpValue))
+ if (SrcReg2 && !getFoldableImm(SrcReg2, *MRI, CmpValue)) {
+ std::pair<MachineInstr *, unsigned> RegSequence2;
----------------
LU-JOHN wrote:
Did any testcases/benchmarks utilize this deeper analysis of SrcReg2? If real code doesn't need this we should simplify it.
https://github.com/llvm/llvm-project/pull/167364
More information about the llvm-commits
mailing list