forked from OSchip/llvm-project
Fix last night's 445.gobmk breakage which was caused by comparison of
APInt's of unequal bitwidth. llvm-svn: 34790
This commit is contained in:
parent
742d1704e1
commit
6ba8edc789
|
@ -1405,6 +1405,7 @@ SCEVHandle ScalarEvolutionsImpl::createSCEV(Value *V) {
|
||||||
APInt CommonFact = GetConstantFactor(LHS);
|
APInt CommonFact = GetConstantFactor(LHS);
|
||||||
assert(!CommonFact.isMinValue() &&
|
assert(!CommonFact.isMinValue() &&
|
||||||
"Common factor should at least be 1!");
|
"Common factor should at least be 1!");
|
||||||
|
CommonFact.zextOrTrunc(CI->getValue().getBitWidth());
|
||||||
if (CommonFact.ugt(CI->getValue())) {
|
if (CommonFact.ugt(CI->getValue())) {
|
||||||
// If the LHS is a multiple that is larger than the RHS, use +.
|
// If the LHS is a multiple that is larger than the RHS, use +.
|
||||||
return SCEVAddExpr::get(LHS,
|
return SCEVAddExpr::get(LHS,
|
||||||
|
|
Loading…
Reference in New Issue