]> git.ipfire.org Git - thirdparty/gcc.git/commit
tree-optimization/106422 - verify block copying in forward threading
authorRichard Biener <rguenther@suse.de>
Fri, 29 Jul 2022 06:24:52 +0000 (08:24 +0200)
committerRichard Biener <rguenther@suse.de>
Fri, 29 Jul 2022 08:47:47 +0000 (10:47 +0200)
commit4894ba078692a780a461d2f358b5dfaa25719859
tree1df9d0769b37ad08851cc08c4e6a842c134da483
parent2dcceedb3c121f2498ae58d8414e7b8454b7bf55
tree-optimization/106422 - verify block copying in forward threading

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.

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.
gcc/testsuite/gcc.dg/torture/pr106422.c [new file with mode: 0644]
gcc/tree-ssa-threadupdate.cc