projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d7a474
)
Don't insert scales of 1 :)
author
Chris Lattner
<sabre@nondot.org>
Fri, 7 Dec 2001 04:26:02 +0000
(
04:26
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Fri, 7 Dec 2001 04:26:02 +0000
(
04:26
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1430
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/TransformInternals.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/TransformInternals.cpp
b/lib/Transforms/TransformInternals.cpp
index e46eaf4d11dfe0d550ad7ff4a5f9a4f549239f8b..63368d55a1d302d288d2d36bf671a710688ae40b 100644
(file)
--- a/
lib/Transforms/TransformInternals.cpp
+++ b/
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);