]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix PR 108582: ICE due to PHI-OPT removing a still in use ssa_name.
authorAndrew Pinski <apinski@marvell.com>
Sat, 28 Jan 2023 18:27:08 +0000 (18:27 +0000)
committerAndrew Pinski <apinski@marvell.com>
Tue, 7 Feb 2023 20:21:35 +0000 (12:21 -0800)
commit6f23c9077feebb29c2a28ffe89b287286df27d6d
tree83a5af14d0b6d022bbebd9e8a02a34d56b6a1c63
parent45b346664c0af57053e77276cd030015eb21f851
Fix PR 108582: ICE due to PHI-OPT removing a still in use ssa_name.

This patch adds a check in match_simplify_replacement to make sure the middlebb
does not have any phi-nodes as we don't currently move those.
This was just a thinko from before.

Committed on the GCC 12 branch after a bootstrap/test on x86_64-linux-gnu.

PR tree-optimization/108582

gcc/ChangeLog:

* tree-ssa-phiopt.cc (match_simplify_replacement): Add check
for middlebb to have no phi nodes.

gcc/testsuite/ChangeLog:

* gcc.dg/pr108582-1.c: New test.

(cherry picked from commit 876b3e0514bc8cb2256c44db56255403bedfa52d)
gcc/testsuite/gcc.dg/pr108582-1.c [new file with mode: 0644]
gcc/tree-ssa-phiopt.cc