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:
1b151b4
)
Fix PR312 and IndVarsSimplify/2004-04-05-InvokeCastCrash.llx
author
Chris Lattner
<sabre@nondot.org>
Mon, 5 Apr 2004 18:46:55 +0000
(18:46 +0000)
committer
Chris Lattner
<sabre@nondot.org>
Mon, 5 Apr 2004 18:46:55 +0000
(18:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12668
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Analysis/ScalarEvolution.cpp
patch
|
blob
|
history
diff --git
a/lib/Analysis/ScalarEvolution.cpp
b/lib/Analysis/ScalarEvolution.cpp
index e75229c0675fcdc02d65b97974eac919e7dfec7b..8e6ee5363ae4974115da9e02ae45dcb5a1a9d422 100644
(file)
--- a/
lib/Analysis/ScalarEvolution.cpp
+++ b/
lib/Analysis/ScalarEvolution.cpp
@@
-2478,6
+2478,8
@@
Value *ScalarEvolutionRewriter::ExpandCodeFor(SCEVHandle SH,
else if (Instruction *I = dyn_cast<Instruction>(V)) {
// FIXME: check to see if there is already a cast!
BasicBlock::iterator IP = I; ++IP;
+ if (InvokeInst *II = dyn_cast<InvokeInst>(I))
+ IP = II->getNormalDest()->begin();
while (isa<PHINode>(IP)) ++IP;
return new CastInst(V, Ty, V->getName(), IP);
} else {