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

Fix for testcase Transforms/IndVarsSimplify/2005-02-11-InvokeCrash.ll

and PR504.

llvm-svn: 20129
This commit is contained in:
Chris Lattner 2005-02-12 03:26:49 +00:00
parent c8d8502a50
commit 8f3f72f2bc

View File

@ -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.