switch conversion: make a rapid speed up
authorMartin Liska <mliska@suse.cz>
Thu, 24 Sep 2020 11:34:13 +0000 (13:34 +0200)
committerMartin Liska <mliska@suse.cz>
Tue, 29 Sep 2020 07:26:07 +0000 (09:26 +0200)
commite46858e4eeee45d35ca4a7df1996186fe884879b
tree4a6167125770535ea2e0c7d1ff4bb527890ef671
parent37ffe56c01e4a9e80a3b3c4f5beb86d80a0663db
switch conversion: make a rapid speed up

gcc/ChangeLog:

PR tree-optimization/96979
* tree-switch-conversion.c (jump_table_cluster::can_be_handled):
Make a fast bail out.
(bit_test_cluster::can_be_handled): Likewise here.
* tree-switch-conversion.h (get_range): Use wi::to_wide instead
of a folding.

gcc/testsuite/ChangeLog:

PR tree-optimization/96979
* g++.dg/tree-ssa/pr96979.C: New test.
gcc/testsuite/g++.dg/tree-ssa/pr96979.C [new file with mode: 0644]
gcc/tree-switch-conversion.c
gcc/tree-switch-conversion.h