[llvm] VT: teach a special-case optz about samesign (PR #122590)
Ramkumar Ramachandra via llvm-commits
llvm-commits at lists.llvm.org
Sat Jan 11 06:41:35 PST 2025
================
@@ -9495,7 +9495,8 @@ isImpliedCondICmps(const ICmpInst *LHS, CmpPredicate RPred, const Value *R0,
// must be positive if X >= Y and no overflow".
// Take SGT as an example: L0:x > L1:y and C >= 0
// ==> R0:(x -nsw y) < R1:(-C) is false
- if ((LPred == ICmpInst::ICMP_SGT || LPred == ICmpInst::ICMP_SGE) &&
+ if ((ICmpInst::isSigned(LPred) || LPred.hasSameSign()) &&
----------------
artagnon wrote:
Fixed, thanks :)
https://github.com/llvm/llvm-project/pull/122590
More information about the llvm-commits
mailing list