tree-optimization/95855 - Add checks to avoid spoiling if-conversion if
authorYang Yang <yangyang305@huawei.com>
Tue, 30 Jun 2020 10:04:31 +0000 (18:04 +0800)
committerRichard Biener <rguenther@suse.de>
Tue, 30 Jun 2020 13:54:07 +0000 (15:54 +0200)
commit33d114f570b4a3583421c700396fd5945acebc28
tree807e0639ce6bd1f283439840d4778dac0d4c5e77
parent7d503e329911a9c7f6d4db3170f6ed6f5a0424ba
tree-optimization/95855 - Add checks to avoid spoiling if-conversion if

Add some checks in pass_splits_paths, so that pass_split_paths can
recognize the missed if-conversion opportunity and do not duplicate the
corresponding block.

2020-06-30 Yang Yang <yangyang305@huawei.com>

gcc/ChangeLog:

PR tree-optimization/95855
* gimple-ssa-split-paths.c (is_feasible_trace): Add extra
checks to recognize a missed if-conversion opportunity when
judging whether to duplicate a block.

gcc/testsuite/ChangeLog

PR tree-optimization/95855
* gcc.dg/tree-ssa/split-path-12.c: New testcase.
gcc/gimple-ssa-split-paths.c
gcc/testsuite/gcc.dg/tree-ssa/split-path-12.c [new file with mode: 0644]