[LLVMdev] conditional flow resulting in "Instruction does not dominate all uses!"

Rafael Espíndola
2013-11-04T16:25:51Z

On 4 November 2013 08:19, Henrique Santos
<henrique.nazare.santos at gmail.com> wrote:
> Well, what I had in mind was actually something like the following:
>
> entry:
>   result0 = invoke func0 to defer_block unwind landing0
>
> landing0:
>   landingpad
>   result1 = invoke func1 to defer_block unwind landing1
>
> landing1:
>   landingpad
>   br defer_block
>
> defer_block:
>   result = phi [ result0, entry ], [ result1, landing0 ], [ null, landing1
]
>   ...
>
> This doesn't have landing pads with multiple predecessors like he said,
> but I don't think that would make much difference.
> The "defer block", however, is the target of multiple invokes.
> I hope this makes sense. : )

It does. Do we produce an error/assert in this case?

Cheers,
Rafael