https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104645
Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |pinskia at gcc dot gnu.org --- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I don't think this should be a P1. Here is another testcase which shows the same issue but is not a regression: int foo(unsigned i) { int t = 0; if (i) { unsigned tt = i % 2u; t = tt; } return t; } int foo1(unsigned i) { unsigned t = i % 2; unsigned tt = i ? t : 0; return tt; } ---- CUT ---- For some reason the code in value_replacement is not able to handle the different IR. I have some ideas on how to fix this for GCC 13 though.