diff options
author | Martin Liska <mliska@suse.cz> | 2022-06-30 15:00:17 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2022-07-01 08:47:49 +0200 |
commit | 618bac5b486832edd3f8eb3ada74740e389dfcb8 (patch) | |
tree | 9a11a53e55fbfe9f15dd98c4d036866f857166bb /gcc/expr.cc | |
parent | 33981253cdf4505af30d3467ba5baa142cc62772 (diff) | |
download | gcc-618bac5b486832edd3f8eb3ada74740e389dfcb8.zip gcc-618bac5b486832edd3f8eb3ada74740e389dfcb8.tar.gz gcc-618bac5b486832edd3f8eb3ada74740e389dfcb8.tar.bz2 |
if-to-switch: properly allow side effects only for first condition
Properly allow side effects only for a first BB in a condition chain.
PR tree-optimization/106126
gcc/ChangeLog:
* gimple-if-to-switch.cc (struct condition_info): Save
has_side_effect.
(find_conditions): Parse all BBs.
(pass_if_to_switch::execute): Allow only side effects for first
BB.
gcc/testsuite/ChangeLog:
* gcc.dg/tree-ssa/pr106126.c: New test.
Diffstat (limited to 'gcc/expr.cc')
0 files changed, 0 insertions, 0 deletions