Fix bug test/Regression/Transforms/LevelRaise/2002-03-21-MissedRaise3.ll

llvm-svn: 1943
This commit is contained in:
Chris Lattner 2002-03-21 23:02:37 +00:00
parent 1a72e3a234
commit 2ed4beefea

View File

@ -71,7 +71,7 @@ static bool MallocConvertableToType(MallocInst *MI, const Type *Ty,
unsigned OldTypeSize = TD.getTypeSize(MI->getType()->getElementType());
// Must have a scale or offset to analyze it...
if (!Expr.Offset && !Expr.Scale) return false;
if (!Expr.Offset && !Expr.Scale && OldTypeSize == 1) return false;
// Get the offset and scale of the allocation...
int OffsetVal = Expr.Offset ? getConstantValue(Expr.Offset) : 0;