From 18d663b62c1c55f03c3f98679d58e9a066b1eb65 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Thu, 1 Mar 2007 17:17:21 +0000 Subject: [PATCH] Fix last night's 445.gobmk breakage which was caused by comparison of APInt's of unequal bitwidth. llvm-svn: 34790 --- lib/Analysis/ScalarEvolution.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 44b5f61749f..8b571cf2779 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -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,