[llvm-commits] CVS: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Aug 1 20:31:25 PDT 2005
Changes in directory llvm/lib/Transforms/Scalar:
LoopStrengthReduce.cpp updated: 1.21 -> 1.22
---
Log message:
Like the comment says, do not insert cast instructions before phi nodes
---
Diffs of the changes: (+4 -0)
LoopStrengthReduce.cpp | 4 ++++
1 files changed, 4 insertions(+)
Index: llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp
diff -u llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.21 llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.22
--- llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp:1.21 Mon Aug 1 21:52:02 2005
+++ llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp Mon Aug 1 22:31:14 2005
@@ -232,6 +232,10 @@
else
++InsertPt;
}
+
+ // Do not insert casts into the middle of PHI node blocks.
+ while (isa<PHINode>(InsertPt)) ++InsertPt;
+
BP = new CastInst(GEP->getOperand(0), UIntPtrTy,
GEP->getOperand(0)->getName(), InsertPt);
}
More information about the llvm-commits
mailing list