From 3f93197098e8c553fefdc2a1b6444838c222695b Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 6 Mar 2005 22:36:12 +0000 Subject: [PATCH] Fix Regression/Transforms/LoopStrengthReduce/dont_insert_redundant_ops.ll, hopefully not breaking too many other things. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20505 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Transforms/Scalar/LoopStrengthReduce.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Transforms/Scalar/LoopStrengthReduce.cpp b/lib/Transforms/Scalar/LoopStrengthReduce.cpp index d2cef4bc0b8..95c1850089f 100644 --- a/lib/Transforms/Scalar/LoopStrengthReduce.cpp +++ b/lib/Transforms/Scalar/LoopStrengthReduce.cpp @@ -189,7 +189,7 @@ void LoopStrengthReduce::strengthReduceGEP(GetElementPtrInst *GEPI, Loop *L, // 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(GEPI->getOperand(0))) { Constant *C = dyn_cast(GEPI->getOperand(0)); -- 2.34.1