------- Additional Comments From irar at il dot ibm dot com 2005-07-07 07:47 ------- The problem occurs in decision whether the number of loop iterations is greater than zero. The (single) predecessor edge is checked for being EDGE_TRUE_VALUE or EDGE_FALSE_VALUE, and the corresponding predicate is used to make the decision.
In the first case (single loop) BB 0 contains predicate 'len>0', its TRUE successor is BB 1, and the fallthru successor of BB 1 is BB 2 - the loop. The condition to check is 'len <= 0', which is therefore simplified to FALSE. In the second case, however, the control flow is more complicated. The loop is in BB 6, its predecessor is BB 3, which has 2 predecessors: BB 5 (with predicate 'len > 0'), and BB 2 - the first loop. The first loop is also guarded by 'len > 0', but this information is not propagated. -- What |Removed |Added ---------------------------------------------------------------------------- CC| |rakdver at atrey dot karlin | |dot mff dot cuni dot cz Last reconfirmed|2005-06-25 18:28:42 |2005-07-07 07:47:46 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=22184