fix regressions from my previous checking, including

Transforms/InstCombine/2006-12-08-ICmp-Combining.ll

llvm-svn: 36989
This commit is contained in:
Chris Lattner 2007-05-11 16:58:45 +00:00
parent 67286b1266
commit 600db3eb96
1 changed files with 2 additions and 2 deletions

View File

@ -3926,9 +3926,9 @@ Instruction *InstCombiner::visitOr(BinaryOperator &I) {
ICmpInst *LHS = cast<ICmpInst>(Op0);
bool NeedsSwap;
if (ICmpInst::isSignedPredicate(LHSCC))
NeedsSwap = LHSCst->getValue().sgt(LHSCst->getValue());
NeedsSwap = LHSCst->getValue().sgt(RHSCst->getValue());
else
NeedsSwap = LHSCst->getValue().ugt(LHSCst->getValue());
NeedsSwap = LHSCst->getValue().ugt(RHSCst->getValue());
if (NeedsSwap) {
std::swap(LHS, RHS);