------- Comment #8 from rguenth at gcc dot gnu dot org 2009-06-02 14:45 ------- Pffft. Not this again...
<bb 3>: # this_2 = PHI <this_45(D)(2), s_4(7)> # s_4 = PHI <s_39(D)(2), this_2(7)> so this_2 and s_4 are equal on one edge but not on another. copyprop is not always able to remove the PHI for some un-obvious reason. Thus, how do we deal with that? We enter PRE with <bb 2>: <bb 3>: # this_2 = PHI <this_45(D)(2), s_4(7)> # s_4 = PHI <s_39(D)(2), this_2(7)> D.2149_3 = this_2->type; if (D.2149_3 == 1) goto <bb 4>; else goto <bb 6>; <bb 6>: goto <bb 5>; <bb 4>: D.2152_5 = s_4->type; if (D.2152_5 == 0) goto <bb 7>; else goto <bb 8>; <bb 7>: goto <bb 3>; <bb 8>: <bb 5>: # this_61 = PHI <this_2(6), this_2(8)> # s_62 = PHI <s_4(6), s_4(8)> ... and have Value numbers: this_61 = this_2 s_62 = s_4 copy-prop seems confused: Simulating statement (from ssa_edges): this_61 = PHI <this_2(3), this_2(4)> Visiting PHI node: this_61 = PHI <this_2(3), this_2(4)> PHI node this_61 copy-of chain: this_61 -> this_61 [NOT A COPY] Telling the propagator to add SSA edges out of this PHI and never visit again. but, before we fix copy-prop we probably should deal with this in PRE by simply not phi_translating in circles. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot |dot org |org Status|NEW |ASSIGNED Last reconfirmed|2009-06-02 13:55:12 |2009-06-02 14:45:08 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40321