1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00

Fix Regression/Transforms/LoopStrengthReduce/dont_insert_redundant_ops.ll,

hopefully not breaking too many other things.

llvm-svn: 20505
This commit is contained in:
Chris Lattner 2005-03-06 22:36:12 +00:00
parent 9471eb53aa
commit 2174b70c68

View File

@ -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<Constant>(GEPI->getOperand(0))) {
Constant *C = dyn_cast<Constant>(GEPI->getOperand(0));