[llvm-commits] Edge dominance in the presence of multiple edges between two BB
Rafael EspĂndola
rafael.espindola at gmail.com
Fri Aug 10 07:30:57 PDT 2012
> define i32 @f(i32 %i) {
> bb0:
> switch i32 %i, label %bb1 [
> i32 1, label %bb2
> i32 2, label %bb2
> ]
> bb1:
> br label %bb2
> bb2:
> %r = phi i32 [ 1, %bb0 ], [ 2, %bb0 ], [ 5, %bb1 ]
> ret i32 %r
> }
I found out that the verifier rejects this:
PHI node has multiple entries for the same basic block with different
incoming values!
Which suggests that we can use a simpler definition of edge dominance
that simply checks if there are multiple edges between two basic
blocks. An updated patch is attached.
Cheers,
Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: t.patch
Type: application/octet-stream
Size: 2291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120810/ac396640/attachment.obj>
More information about the llvm-commits
mailing list