Fix Regression/Transforms/LoopStrengthReduce/dont_insert_redundant_ops.ll,
hopefully not breaking too many other things.

llvm-svn: 20505
diff --git a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index d2cef4b..95c1850 100644
--- a/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@ -189,7 +189,7 @@
   // that it was the induction variable, and has been replaced by a constant
   // null value.  In this case, replace the GEP with a use of pointer directly.
   PHINode *NewPHI;
-  if (1) {
+  if (Cache->CachedPHINode == 0) {
     Value *PreGEP;
     if (AllConstantOperands && isa<Constant>(GEPI->getOperand(0))) {
       Constant *C = dyn_cast<Constant>(GEPI->getOperand(0));