From: Chris Lattner Date: Thu, 6 Dec 2001 18:05:55 +0000 (+0000) Subject: Fix bug that caused invalid transformations to be applied X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=26a408ab9a336cf77ac9af977b53138756fa68f7;p=oota-llvm.git Fix bug that caused invalid transformations to be applied git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1426 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/TransformInternals.cpp b/lib/Transforms/TransformInternals.cpp index c12fe6930fa..e46eaf4d11d 100644 --- a/lib/Transforms/TransformInternals.cpp +++ b/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);