[llvm-commits] [llvm] r60288 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/sdiv-2.ll
Duncan Sands
baldrick at free.fr
Sun Nov 30 23:50:30 PST 2008
Hi Bill,
> - if ((RHS->getSExtValue() < 0 && RHSNegAPI.slt(TwoToExp - 1)) ||
> - (RHS->getSExtValue() > 0 && RHSNegAPI.sgt(TwoToExp * NegOne))) {
> + if ((RHS->getValue().isNegative() && RHSNegAPI.slt(TwoToExp - 1)) ||
> + (RHS->getValue().isNonNegative() && RHSNegAPI.sgt(TwoToExp * NegOne))) {
before you were testing RHS > 0, but it looks like you are now testing RHS >= 0.
> - if ((CI->getSExtValue() < 0 && CINegAPI.slt(TwoToExp - 1)) ||
> - (CI->getSExtValue() > 0 && CINegAPI.sgt(TwoToExp * NegOne)))
> + if ((CI->getValue().isNegative() && CINegAPI.slt(TwoToExp - 1)) ||
> + (CI->getValue().isNonNegative() && CINegAPI.sgt(TwoToExp*NegOne)))
Likewise. No idea if this matters!
Ciao,
Duncan.
More information about the llvm-commits
mailing list