[llvm-commits] [llvm] r67139 - in /llvm/trunk: lib/Transforms/IPO/DeadArgumentElimination.cpp test/Transforms/DeadArgElim/2009-03-17-MRE-Invoke.ll
Duncan Sands
baldrick at free.fr
Wed Mar 18 09:45:20 PDT 2009
Dear Chris,
> >> + if (InvokeInst *II = dyn_cast<InvokeInst>(Call))
> >> + InsertPt = II->getNormalDest()->begin();
> >
> > mightn't this result in inserting the instructions before a
> > phi node?
>
> I initially thought so, but no, they aren't allowed here. Consider
> this testcase:
you are so innocent!
define internal { i32, i32 } @foo() {
ret {i32,i32} {i32 42, i32 4}
}
define i32 @bar2() {
entry:
%x = invoke {i32,i32} @foo() to label %T unwind label %T2
T:
%PN = phi i32 [0, %entry]
%y = extractvalue {i32,i32} %x, 1
ret i32 %y
T2:
unreachable
}
With best wishes,
Dr Evil.
More information about the llvm-commits
mailing list