diff options
Diffstat (limited to 'llvm/lib/Transforms/TransformInternals.cpp')
| -rw-r--r-- | llvm/lib/Transforms/TransformInternals.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/TransformInternals.cpp b/llvm/lib/Transforms/TransformInternals.cpp index 6b42d0c7667..f773a1c473e 100644 --- a/llvm/lib/Transforms/TransformInternals.cpp +++ b/llvm/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 |

