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:
50237f2
)
Fix for testcase Transforms/IndVarsSimplify/2005-02-11-InvokeCrash.ll
author
Chris Lattner
<sabre@nondot.org>
Sat, 12 Feb 2005 03:26:49 +0000
(
03:26
+0000)
committer
Chris Lattner
<sabre@nondot.org>
Sat, 12 Feb 2005 03:26:49 +0000
(
03:26
+0000)
and PR504.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20129
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Transforms/Scalar/IndVarSimplify.cpp
patch
|
blob
|
history
diff --git
a/lib/Transforms/Scalar/IndVarSimplify.cpp
b/lib/Transforms/Scalar/IndVarSimplify.cpp
index 7ad8ef403c85fe2ade0d7c005a0fedef1995a48c..bc867029569b3dafbf1dc66d9b3bd7cc6b27d09c 100644
(file)
--- a/
lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/
lib/Transforms/Scalar/IndVarSimplify.cpp
@@
-133,6
+133,8
@@
namespace {
if ((*UI)->getType() == Ty)
if (CastInst *CI = dyn_cast<CastInst>(cast<Instruction>(*UI))) {
BasicBlock::iterator It = I; ++It;
+ if (isa<InvokeInst>(I))
+ It = cast<InvokeInst>(I)->getNormalDest()->begin();
while (isa<PHINode>(It)) ++It;
if (It != BasicBlock::iterator(CI)) {
// Splice the cast immediately after the operand in question.