Simplify.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107248 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2010-06-30 06:09:46 +00:00
parent 876085dcfa
commit 204b7cad7a

View File

@ -1101,8 +1101,7 @@ Value *SCEVExpander::visitAddRecExpr(const SCEVAddRecExpr *S) {
}
// {0,+,1} --> Insert a canonical induction variable into the loop!
if (S->isAffine() &&
S->getOperand(1) == SE.getConstant(Ty, 1)) {
if (S->isAffine() && S->getOperand(1)->isOne()) {
// If there's a canonical IV, just use it.
if (CanonicalIV) {
assert(Ty == SE.getEffectiveSCEVType(CanonicalIV->getType()) &&