https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102681
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #51649|0 |1 is obsolete| | --- Comment #14 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Created attachment 51650 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51650&action=edit Little more reduced So FRE is able to figure out for the following: # _20 = PHI <0(2), 1(3)> # const_upper_26 = PHI <const_upper_27(D)(2), _19(3)> .... # _30 = PHI <0(12), 1(13)> # const_upper_33 = PHI <const_upper_34(D)(12), _29(13)> That _30 is the same as _20 but not _26 is the same as _33 even though it does figure out that _19 and _29 are the same as _10. If it is able to figure that out, then things would just work. Richi, I assume FRE does not Value number default SSA names (non-parm) the same which is why this is happening is that correct?