https://gcc.gnu.org/bugzilla/show_bug.cgi?id=127645
Drea Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |11.1.0
--- Comment #5 from Drea Pinski <pinskia at gcc dot gnu.org> ---
The invalid undefined transformation in cselim started in GCC 11.
Most likely r11-897-g54ecfb182bc321 .
PRE turns (that happened in GCC 11 also):
# .MEM_18 = VDEF <.MEM_13>
MEM <union u0> [(void *)&g18].f2 = cstore_17;
# VUSE <.MEM_18>
_4 = g18.f1;
into:
# cstore_17 = PHI <1(5), cstore_16(6)>
# .MEM_18 = VDEF <.MEM_13>
MEM <union u0> [(void *)&g18].f2 = cstore_17;
_15 = VIEW_CONVERT_EXPR<unsigned char>(cstore_17);
Looks like jump threading then comes along and optimizes things (based on the
undefinedness it seems).