https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100171
--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> --- Compared to the non-self case where we see <bb 2> [local count: 357878152]: _19 = MEM <const double[2]> [(const value_type &)arg1_3(D)][0]; _20 = MEM <const double[2]> [(const value_type &)arg2_4(D)][0]; _21 = _19 + _20; _26 = MEM <const double[2]> [(const value_type &)arg1_3(D)][1]; _27 = MEM <const double[2]> [(const value_type &)arg2_4(D)][1]; _28 = _26 + _27; res ={v} {CLOBBER}; MEM[(struct value_type *)out_2(D)][0].value._M_elems[0] = _21; MEM[(struct value_type *)out_2(D)][0].value._M_elems[1] = _28; return; here intermediate optimizations have elided 'res'.