------- Comment #7 from ubizjak at gmail dot com  2007-07-01 15:46 -------
Well, the problem is, that we "forgot" to take into account false branch from
bb4 to bb6. In notation form the Comment #6, this branch has the condition !C4,
so the total condition for branch from bb4 leading to bb6 would be: !C3 && !C4.

The conditions for both branches leading to phi node are then:

left: (C3 || C4) && 1  ----->    C3 || C4
right: !C3 && !C4  --------->  !(C3 || C4)

With above correction, phi

  # quotient_3 = PHI <quotient_20(4), quotient_22(5)>

would be substituted with:

  quotient_3 = !(C3 || C4) ? quotient_20 : quotient_22;

  or:

  quotient_3 = (C3 || C4) ? quotient_22 : quotient_20;

which just happens to be the correct condition.

QED.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31966

Reply via email to