https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126375
Souradipto Das <souradiptodas6 at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |souradiptodas6 at gmail dot com
--- Comment #2 from Souradipto Das <souradiptodas6 at gmail dot com> ---
I bisected the error to the following commit:
commit 936a12331a2bd95e9003221e292719b7ffcf07d0
Author: Jan Hubicka <[email protected]>
Date: Wed Aug 23 11:17:20 2023 +0200
Fix handling of static exists in loop_ch
Additional findings:
* Compiling with `-O2 -fno-tree-ch` avoids the bug.
* Compiling with `-O2 -fno-thread-jumps` ALSO avoids the bug and restores
correct runtime behavior.
This indicates that the aggressive zero-cost block duplication introduced to
`loop_ch` in this commit is altering the CFG in a way that exposes a downstream
miscompilation in the jump threading pass.