diff options
author | Andrew Pinski <quic_apinski@quicinc.com> | 2024-10-01 14:48:19 -0700 |
---|---|---|
committer | Andrew Pinski <quic_apinski@quicinc.com> | 2024-10-02 00:36:33 -0700 |
commit | cea87c84eacdb422caeada734ba5138c994d7022 (patch) | |
tree | 0ec4610db44d93feb58e6b20be04c74e89f6921e /libcpp/files.cc | |
parent | 9175d08f756c1664ecb397fdacca150409dcca49 (diff) | |
download | gcc-cea87c84eacdb422caeada734ba5138c994d7022.zip gcc-cea87c84eacdb422caeada734ba5138c994d7022.tar.gz gcc-cea87c84eacdb422caeada734ba5138c994d7022.tar.bz2 |
backprop: Fix deleting of a phi node [PR116922]
The problem here is remove_unused_var is called on a name that is
defined by a phi node but it deletes it like removing a normal statement.
remove_phi_node should be called rather than gsi_remove for phinodes.
Note there is a possibility of using simple_dce_from_worklist instead
but that is for another day.
Bootstrapped and tested on x86_64-linux-gnu.
PR tree-optimization/116922
gcc/ChangeLog:
* gimple-ssa-backprop.cc (remove_unused_var): Handle phi
nodes correctly.
gcc/testsuite/ChangeLog:
* gcc.dg/torture/pr116922.c: New test.
Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
Diffstat (limited to 'libcpp/files.cc')
0 files changed, 0 insertions, 0 deletions