Bug fix for test/Regression/Other/2002-02-14-LevelRaiseBadAssert.ll


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1767 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/TransformInternals.cpp b/lib/Transforms/TransformInternals.cpp
index 6b42d0c..f773a1c 100644
--- a/lib/Transforms/TransformInternals.cpp
+++ b/lib/Transforms/TransformInternals.cpp
@@ -155,6 +155,7 @@
     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