]> git.ipfire.org Git - thirdparty/gcc.git/commit
cfglceanup: Fix check for preheaders
authorAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Sat, 15 Nov 2025 22:51:32 +0000 (14:51 -0800)
committerAndrew Pinski <andrew.pinski@oss.qualcomm.com>
Sun, 16 Nov 2025 18:02:03 +0000 (10:02 -0800)
commitb2e40fc16eb174ff8d97295367806dd93a0b189e
tree2e5d4363b6af9cb5c34fa0bb4c4428511ada01d9
parent84dbb22f32a525a0f0e0b7c02c56eec2fa6f39da
cfglceanup: Fix check for preheaders

I had messed up the check in r16-5258-g1d8e2d51e5c5cb for preheaders
where return to remvoe the forwarder preheader block even if LOOPS_HAVE_PREHEADERS
was set. I am not sure how often this happens because most of the time the pre-header
will have an incoming phi block anyways but it is safer not to remove it in this case.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

* tree-cfgcleanup.cc (tree_forwarder_block_p): Restore check on
LOOPS_HAVE_PREHEADERS.

Signed-off-by: Andrew Pinski <andrew.pinski@oss.qualcomm.com>
gcc/tree-cfgcleanup.cc