1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-20 19:42:54 +02:00

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:
Reid Spencer 2007-03-01 17:17:21 +00:00
parent 6a95676875
commit 18d663b62c

View File

@ -1405,6 +1405,7 @@ SCEVHandle ScalarEvolutionsImpl::createSCEV(Value *V) {
APInt CommonFact = GetConstantFactor(LHS);
assert(!CommonFact.isMinValue() &&
"Common factor should at least be 1!");
CommonFact.zextOrTrunc(CI->getValue().getBitWidth());
if (CommonFact.ugt(CI->getValue())) {
// If the LHS is a multiple that is larger than the RHS, use +.
return SCEVAddExpr::get(LHS,