[llvm] [X86][CodeGen] Return true when MIR is changed after optimizeCompareInstr (PR #91723)
Shengchen Kan via llvm-commits
llvm-commits at lists.llvm.org
Fri May 10 08:02:17 PDT 2024
================
@@ -5169,7 +5169,7 @@ bool X86InstrInfo::optimizeCompareInstr(MachineInstr &CmpInstr, Register SrcReg,
// Fall through to optimize Cmp if Cmp is CMPrr or CMPri.
if (NewOpcode == X86::CMP64rm || NewOpcode == X86::CMP32rm ||
NewOpcode == X86::CMP16rm || NewOpcode == X86::CMP8rm)
- return false;
+ return true;
----------------
KanRobert wrote:
The following is not to check EFLAGS, but for more aggressive optimizations for EFLAGS. Memory analysis is not safe in MIR pass, so we don't do that for CMPrm.
https://github.com/llvm/llvm-project/pull/91723
More information about the llvm-commits
mailing list