https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109002
--- Comment #4 from Richard Biener ---
When doing partial PRE we somehow lose the effect of
g = 1;
we also generate weird PHIs:
pretmp_20 = h;
pretmp_22 = g;
# prephitmp_21 = PHI
# prephitmp_23 = PHI
# prephitmp_24 = PHI
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109002
Richard Biener changed:
What|Removed |Added
Last reconfirmed||2023-03-03
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109002
--- Comment #2 from Akihiko Odaki ---
Oops. Replacing i++ with i = !i removes the undefined behavior while the bug
still remains.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109002
--- Comment #1 from Andrew Pinski ---
Note there will be undefined behavior when i become INT_MAx.