From b1995e1e69851f4a268f93150c17c06442ee1265 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 6 Dec 2001 18:05:55 +0000 Subject: Fix bug that caused invalid transformations to be applied llvm-svn: 1426 --- llvm/lib/Transforms/TransformInternals.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/TransformInternals.cpp') diff --git a/llvm/lib/Transforms/TransformInternals.cpp b/llvm/lib/Transforms/TransformInternals.cpp index c12fe6930fa..e46eaf4d11d 100644 --- a/llvm/lib/Transforms/TransformInternals.cpp +++ b/llvm/lib/Transforms/TransformInternals.cpp @@ -203,7 +203,7 @@ const Type *ConvertableToGEP(const Type *Ty, Value *OffsetVal, Expr.Var = IdxCast; } - if (Scale > ElSize) { // If we have to scale up our index, do so now + if (ScaleAmt) { // If we have to scale up our index, do so now Value *ScaleAmtVal = ConstantUInt::get(Type::UIntTy, ScaleAmt); Instruction *Scaler = BinaryOperator::create(Instruction::Mul, Expr.Var,ScaleAmtVal); -- cgit v1.2.3