projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
64fe584
)
Like the comment says, do not insert cast instructions before phi nodes
author
Chris Lattner
<sabre@nondot.org>
Tue, 2 Aug 2005 03:31:14 +0000
(
03:31
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Tue, 2 Aug 2005 03:31:14 +0000
(
03:31
+0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22586
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/LoopStrengthReduce.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/LoopStrengthReduce.cpp
b/lib/Transforms/Scalar/LoopStrengthReduce.cpp
index fcb7ad3dfde1379334aea975f0b1cead34b5a826..33714a2ad203678447fb498f4b9ea1502f3613a5 100644
(file)
--- a/
lib/Transforms/Scalar/LoopStrengthReduce.cpp
+++ b/
lib/Transforms/Scalar/LoopStrengthReduce.cpp
@@
-232,6
+232,10
@@
void LoopStrengthReduce::AnalyzeGetElementPtrUsers(GetElementPtrInst *GEP,
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);
}