On 7/29/2022 2:47 AM, Richard Biener via Gcc-patches wrote:
The forward threader failed to check whether it can actually duplicate blocks. The following adds this in a similar place the backwards threader performs this check. Bootstrapped and tested on x86_64-unknown-linux-gnu, pushed. PR tree-optimization/106422 * tree-ssa-threadupdate.cc (fwd_jt_path_registry::update_cfg): Check whether we can copy thread blocks and cancel the thread if not. * gcc.dg/torture/pr106422.c: New testcase.
I'm back from PTO. This looks obviously correct to me. jeff