fold and VRP interact badly if we have a range test like if (i > 0 && i <=5) ...
as we fold that to if ((unsigned int) i + 0x0ffffffff > 4) ... for which VRP fails to extract a range for i. If we write the range test so that fold doesn't see it, VRP is happy: if (i > 0) if (i <= 5) ... -- Summary: VRP cannot extract a range from (unsigned int) i + 0x0ffffffff > 4 Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: rguenth at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30317