if-to-switch: fix also virtual phis
authorMartin Liska <mliska@suse.cz>
Tue, 12 Jan 2021 12:40:44 +0000 (13:40 +0100)
committerMartin Liska <mliska@suse.cz>
Wed, 13 Jan 2021 10:33:28 +0000 (11:33 +0100)
commit7875e8dc831f30eec7203e090a209efe4c01a27d
tree48b1f10b1e11157c58ca1bad0181aa2f339acec9
parent0db5f48848632cc571022b2c700ddcf69264f433
if-to-switch: fix also virtual phis

gcc/ChangeLog:

PR tree-optimization/98455
* gimple-if-to-switch.cc (condition_info::record_phi_mapping):
Record also virtual PHIs.
(pass_if_to_switch::execute): Return TODO_cleanup_cfg only
conditionally.

gcc/testsuite/ChangeLog:

PR tree-optimization/98455
* gcc.dg/tree-ssa/pr98455.c: New test.
gcc/gimple-if-to-switch.cc
gcc/testsuite/gcc.dg/tree-ssa/pr98455.c [new file with mode: 0644]