@@ -6664,17 +6664,17 @@ const ConstantRange &ScalarEvolution::getRangeRef(
66646664 WrapType |= OBO::NoSignedWrap;
66656665 if (Add->hasNoUnsignedWrap())
66666666 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);
66706670 return setRange(Add, SignHint,
66716671 ConservativeResult.intersectWith(X, RangeType));
66726672 }
66736673 case scMulExpr: {
66746674 const SCEVMulExpr *Mul = cast<SCEVMulExpr>(S);
66756675 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));
66786678 return setRange(Mul, SignHint,
66796679 ConservativeResult.intersectWith(X, RangeType));
66806680 }
0 commit comments