diff options
Diffstat (limited to 'llvm/lib/Transforms/TransformInternals.cpp')
| -rw-r--r-- | llvm/lib/Transforms/TransformInternals.cpp | 3 | 
1 files changed, 2 insertions, 1 deletions
| diff --git a/llvm/lib/Transforms/TransformInternals.cpp b/llvm/lib/Transforms/TransformInternals.cpp index e46eaf4d11d..63368d55a1d 100644 --- a/llvm/lib/Transforms/TransformInternals.cpp +++ b/llvm/lib/Transforms/TransformInternals.cpp @@ -203,7 +203,8 @@ const Type *ConvertableToGEP(const Type *Ty, Value *OffsetVal,              Expr.Var = IdxCast;            } -          if (ScaleAmt) {         // If we have to scale up our index, do so now +          if (ScaleAmt && ScaleAmt != 1) { +            // 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); | 

