https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99117
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|middle-end |libstdc++ --- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> --- FRE5 does <bb 23> [local count: 2736164397]: # ivtmp.143_71 = PHI <ivtmp.143_186(23), ivtmp.143_187(22)> _221 = (void *) ivtmp.143_71; _124 = MEM[(int * *)_221 + 8B]; - _115 = MEM[(const int &)_101]; _162 = MEM[(const int &)_124]; - _140 = _115 + _162; - *_101 = _140; + *_101 = _162; __p_61 = _101 + 4; _127 = _124 + 4; - _131 = MEM[(const int &)__p_61]; _132 = *_127; - _133 = _131 + _132; - *__p_61 = _133; + *__p_61 = _132; __p_136 = __p_61 + 4; D.69731 ={v} {CLOBBER}; ivtmp.143_186 = ivtmp.143_71 + 16; - if (ivtmp.143_186 != _60) + if (_158 != ivtmp.143_186) goto <bb 23>; [89.00%] which looks wrong at a first glance. Ah, it's OK because we have <bb 23> [local count: 2736164397]: # ivtmp.143_71 = PHI <ivtmp.143_186(23), ivtmp.143_187(22)> # PT = null { D.69770 } (escaped, escaped heap) _221 = (void *) ivtmp.143_71; # PT = nonlocal escaped null { D.69771 } (escaped, escaped heap) _124 = MEM[(int * *)_221 + 8B clique 11 base 0]; _115 = MEM[(const int &)_101 clique 11 base 0]; _162 = MEM[(const int &)_124 clique 11 base 0]; _140 = _115 + _162; MEM[(int *)_101 clique 11 base 1] = _140; # PT = { D.69772 } (escaped, escaped heap) __p_61 = _101 + 4; # PT = nonlocal escaped null { D.69771 } (escaped, escaped heap) _127 = _124 + 4; _131 = MEM[(const int &)__p_61 clique 11 base 0]; _132 = MEM[(const int &)_127 clique 11 base 0]; _133 = _131 + _132; MEM[(int *)__p_61 clique 11 base 1] = _133; # PT = { D.69772 } (escaped, escaped heap) __p_136 = __p_61 + 4; D.69731 ={v} {CLOBBER}; ivtmp.143_186 = ivtmp.143_71 + 16; if (ivtmp.143_186 != _60) goto <bb 23>; [89.00%] else goto <bb 21>; [11.00%] so the load is from clique 11, base 0 while the store is to clique 11, base 1 so they do not alias because of some __restrict marking. So the issue is likely an invalid testcase or bogus annotation in libstdc++