Fixed old typo in ScalarEvolution, that caused wrong SCEVs zext operation.

Detailed description is here:
http://llvm.org/bugs/show_bug.cgi?id=18000#c16

For participation in bugfix process special thanks to David Wiberg.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198863 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Stepan Dyatkovskiy
2014-01-09 12:26:12 +00:00
parent db5c1f3d76
commit 3539d6d40c
2 changed files with 82 additions and 1 deletions

View File

@ -6217,7 +6217,7 @@ bool ScalarEvolution::isImpliedCond(ICmpInst::Predicate Pred,
// LHS' type is checked for above.
if (getTypeSizeInBits(LHS->getType()) >
getTypeSizeInBits(FoundLHS->getType())) {
if (CmpInst::isSigned(Pred)) {
if (CmpInst::isSigned(FoundPred)) {
FoundLHS = getSignExtendExpr(FoundLHS, LHS->getType());
FoundRHS = getSignExtendExpr(FoundRHS, LHS->getType());
} else {