[llvm] [NFC][AArch64] Improve semantics of findSuitableCompare in ConditionOptimizer (PR #183532)
Nashe Mncube via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 07:17:30 PST 2026
================
@@ -396,23 +411,6 @@ bool AArch64ConditionOptimizer::adjustTo(MachineInstr *CmpMI,
return false;
}
-bool AArch64ConditionOptimizer::isPureCmp(MachineInstr &CmpMI) {
- unsigned ShiftAmt = AArch64_AM::getShiftValue(CmpMI.getOperand(3).getImm());
- if (!CmpMI.getOperand(2).isImm()) {
- LLVM_DEBUG(dbgs() << "Immediate of cmp is symbolic, " << CmpMI << '\n');
- return false;
- } else if (CmpMI.getOperand(2).getImm() << ShiftAmt >= 0xfff) {
- LLVM_DEBUG(dbgs() << "Immediate of cmp may be out of range, " << CmpMI
- << '\n');
- return false;
- } else if (!MRI->use_nodbg_empty(CmpMI.getOperand(0).getReg())) {
- LLVM_DEBUG(dbgs() << "Destination of cmp is not dead, " << CmpMI << '\n');
- return false;
- }
-
- return true;
-}
----------------
nasherm wrote:
There's another patch in review that removes this function
https://github.com/llvm/llvm-project/pull/183568
https://github.com/llvm/llvm-project/pull/183532
More information about the llvm-commits
mailing list