[llvm] SCEV: teach isImpliedViaOperations about samesign (PR #124270)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 31 11:08:43 PST 2025
================
@@ -11882,22 +11880,23 @@ bool ScalarEvolution::isImpliedCondBalancedTypes(
// Forms 1. and 2. require swapping the operands of one condition. Don't
// do this if it would break canonical constant/addrec ordering.
if (!isa<SCEVConstant>(RHS) && !isa<SCEVAddRecExpr>(LHS))
- return isImpliedCondOperands(FoundPred, RHS, LHS, FoundLHS, FoundRHS,
- CtxI);
+ return isImpliedCondOperands(ICmpInst::getSwappedCmpPredicate(*P), RHS,
----------------
goldsteinn wrote:
Can we not just use `FoundPred` instead of `ICmpInst::getSwappedCmpPredicate(*P)`, either way its a nit so do as you prefer.
https://github.com/llvm/llvm-project/pull/124270
More information about the llvm-commits
mailing list