aboutsummaryrefslogtreecommitdiff
path: root/lib/Transforms/TransformInternals.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms/TransformInternals.cpp')
-rw-r--r--lib/Transforms/TransformInternals.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Transforms/TransformInternals.cpp b/lib/Transforms/TransformInternals.cpp
index 6b42d0c766..f773a1c473 100644
--- a/lib/Transforms/TransformInternals.cpp
+++ b/lib/Transforms/TransformInternals.cpp
@@ -155,6 +155,7 @@ const Type *ConvertableToGEP(const Type *Ty, Value *OffsetVal,
int Val = getConstantValue(Expr.Scale);
if (Val < 0) return false; // Don't mess with negative scales
Scale = (unsigned)Val;
+ if (Scale == 1) Scale = 0; // No interesting scale if *1
}
// Loop over the Scale and Offset values, filling in the Indices vector for