http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45522
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2010-10-28 20:41:46 |2011-08-09 20:41:46 Summary|VRP misses oppurtunity for |PRE misses oppurtunity for |statement folding. |statement folding. --- Comment #13 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-08-09 15:05:44 UTC --- comment #3 works now: Folding statement: D.2751_6 = tree_code_type[D.2750_5]; Folded into: D.2751_6 = 2; I can't see how comment #4 should work - in VRP1 we end up with <bb 2>: goto <bb 4>; <bb 3>: D.2737_5 = BIT_FIELD_REF <*tinfo_4(D), 8, 0>; D.2738_6 = D.2737_5 & 1; fancy_abort ("../../gcc/cp/rtti.c", 1529, &__FUNCTION__); ix_11 = ix_1 + 1; <bb 4>: # ix_1 = PHI <0(2), ix_11(3)> D.2742_3 = fundamentals[ix_1]; if (D.2742_3 != 0B) goto <bb 3>; else goto <bb 5>; <bb 5>: return; so I suppose an earlier patch already did the folding. I can confirm comment #5. Removing VRP reference from the summary.