diff options
| author | Chris Lattner <sabre@nondot.org> | 2001-12-07 04:26:02 +0000 | 
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2001-12-07 04:26:02 +0000 | 
| commit | 72da4460b304512084906dd15cab28a01dcaa8b9 (patch) | |
| tree | b0727e07cf57a9a4d237420cc26487870c7c4266 /llvm/lib/Transforms | |
| parent | a57615faaa87449a6df4a503a50fe8c0f8c842bb (diff) | |
| download | bcm5719-llvm-72da4460b304512084906dd15cab28a01dcaa8b9.tar.gz bcm5719-llvm-72da4460b304512084906dd15cab28a01dcaa8b9.zip | |
Don't insert scales of 1  :)
llvm-svn: 1430
Diffstat (limited to 'llvm/lib/Transforms')
| -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); | 

