Displaying 2 results from an estimated 2 matches for "switchinstr".
Did you mean:
switchinst
2008 Sep 27
0
[LLVMdev] SwitchInstr::removeCase() doesn't remove PHINodes' predecessors
Nuno Lopes wrote:
> PHINode should have one entry for each predecessor of its parent basic
> block!
> %ret.0 = phi i32 [ 0, %ifthen ], [ 1, %ifelse ] ; <i32>
> [#uses=1]
> Broken module found, compilation aborted!
>
> This is because myphi is not reachable from ifthen anymore. My question is:
> is this a bug (or missing feature) or do I need to
2008 Sep 27
2
[LLVMdev] SwitchInstr::removeCase() doesn't remove PHINodes' predecessors
Hi,
I've been writing an optimization pass (described on the ML previously).
Sometimes this pass removes some case entries from switch instructions,
which cause an abort because removeCase() doesn't fix the PHINodes
predecessors when needed.
e.g.:
define i32 @foo() nounwind {
ifthen:
%call = call i32 @bar()
switch i32 %call, label %myphi [
i32 0, label %ifelse
i32 1, label