@@ -6664,17 +6664,17 @@ const ConstantRange &ScalarEvolution::getRangeRef(
6664
6664
WrapType |= OBO::NoSignedWrap;
6665
6665
if (Add->hasNoUnsignedWrap())
6666
6666
WrapType |= OBO::NoUnsignedWrap;
6667
- for (unsigned i = 1, e = Add->getNumOperands(); i != e; ++i )
6668
- X = X.addWithNoWrap(getRangeRef(Add->getOperand(i) , SignHint, Depth + 1),
6669
- WrapType, RangeType);
6667
+ for (const SCEV *Op : drop_begin( Add->operands()) )
6668
+ X = X.addWithNoWrap(getRangeRef(Op , SignHint, Depth + 1), WrapType ,
6669
+ RangeType);
6670
6670
return setRange(Add, SignHint,
6671
6671
ConservativeResult.intersectWith(X, RangeType));
6672
6672
}
6673
6673
case scMulExpr: {
6674
6674
const SCEVMulExpr *Mul = cast<SCEVMulExpr>(S);
6675
6675
ConstantRange X = getRangeRef(Mul->getOperand(0), SignHint, Depth + 1);
6676
- for (unsigned i = 1, e = Mul->getNumOperands(); i != e; ++i )
6677
- X = X.multiply(getRangeRef(Mul->getOperand(i) , SignHint, Depth + 1));
6676
+ for (const SCEV *Op : drop_begin( Mul->operands()) )
6677
+ X = X.multiply(getRangeRef(Op , SignHint, Depth + 1));
6678
6678
return setRange(Mul, SignHint,
6679
6679
ConservativeResult.intersectWith(X, RangeType));
6680
6680
}
0 commit comments