------- Comment #6 from ubizjak at gmail dot com 2007-07-01 14:20 -------
In the tree-if-conv.c, there is a comment with the reference to PR23115, where
similar problems were addressed:
4) If pred B is dominated by pred A then use pred B's condition.
See PR23115. */
For attached testcase, we have following CFG:
bb3
/ \
/ \
/ \
V V
bb5 <---- bb4
\ /
\ /
\ /
V V
bb6
with the conditions:
bb3: C3 = (high_top_bit_11 != 0)
bb4: C4 = (d_7(D) <= high_19)
predicates for blocks are then:
bb4: !C3
bb5: C3 || !C3 & C4 [ = C3 || C4 ]
In bb6, we have:
# quotient_3 = PHI <quotient_20(4), quotient_22(5)>
For some reason domiated_by_p() failed to detect that bb5 is dominated by bb4
and if-conversion simply assigns bb4 predicate (!C3) as the phi node condition.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31966