mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Fix for testcase Transforms/IndVarsSimplify/2005-02-11-InvokeCrash.ll
and PR504. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20129 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
50237f28c5
commit
f6249261a9
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user