"setcc" -> "icmp op" in comments. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44249
91177308-0d34-0410-b5e6-
96231b3b80d8
SCEVHandle ComputeIterationCount(const Loop *L);
/// ComputeLoadConstantCompareIterationCount - Given an exit condition of
SCEVHandle ComputeIterationCount(const Loop *L);
/// ComputeLoadConstantCompareIterationCount - Given an exit condition of
- /// 'setcc load X, cst', try to see if we can compute the trip count.
+ /// 'icmp op load X, cst', try to see if we can compute the trip count.
SCEVHandle ComputeLoadConstantCompareIterationCount(LoadInst *LI,
Constant *RHS,
const Loop *L,
SCEVHandle ComputeLoadConstantCompareIterationCount(LoadInst *LI,
Constant *RHS,
const Loop *L,
if (!V.isMinValue())
return V;
else // Zero is a multiple of everything.
if (!V.isMinValue())
return V;
else // Zero is a multiple of everything.
- return APInt(C->getBitWidth(), 1).shl(C->getBitWidth()-1);
+ return APInt::getHighBitsSet(C->getBitWidth(), 1);
- if (SCEVTruncateExpr *T = dyn_cast<SCEVTruncateExpr>(S)) {
+ if (SCEVTruncateExpr *T = dyn_cast<SCEVTruncateExpr>(S))
return GetConstantFactor(T->getOperand()).trunc(
cast<IntegerType>(T->getType())->getBitWidth());
return GetConstantFactor(T->getOperand()).trunc(
cast<IntegerType>(T->getType())->getBitWidth());
if (SCEVZeroExtendExpr *E = dyn_cast<SCEVZeroExtendExpr>(S))
return GetConstantFactor(E->getOperand()).zext(
cast<IntegerType>(E->getType())->getBitWidth());
if (SCEVZeroExtendExpr *E = dyn_cast<SCEVZeroExtendExpr>(S))
return GetConstantFactor(E->getOperand()).zext(
cast<IntegerType>(E->getType())->getBitWidth());
}
/// ComputeLoadConstantCompareIterationCount - Given an exit condition of
}
/// ComputeLoadConstantCompareIterationCount - Given an exit condition of
-/// 'setcc load X, cst', try to se if we can compute the trip count.
+/// 'icmp op load X, cst', try to se if we can compute the trip count.
SCEVHandle ScalarEvolutionsImpl::
ComputeLoadConstantCompareIterationCount(LoadInst *LI, Constant *RHS,
const Loop *L,
SCEVHandle ScalarEvolutionsImpl::
ComputeLoadConstantCompareIterationCount(LoadInst *LI, Constant *RHS,
const Loop *L,