Fix probability for bit-tests.
commitf40af799df5025d981b2f551c3ef9f1dc0c4d7b6
authormarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 27 Aug 2018 12:18:24 +0000 (27 12:18 +0000)
committermarxin <marxin@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 27 Aug 2018 12:18:24 +0000 (27 12:18 +0000)
treecbc9beace64c77f4308af6ab49a52a1edc6b67a1
parentcb0d0bb08125cf8ec6569afa13fbfce17fa96283
Fix probability for bit-tests.

2018-08-27  Martin Liska  <mliska@suse.cz>

* tree-switch-conversion.c (bit_test_cluster::find_bit_tests):
        Add new argument to bit_test_cluster constructor.
(bit_test_cluster::emit): Set bits really number of values
        handlel by a test.
(bit_test_cluster::hoist_edge_and_branch_if_true): Add
        probability argument.
* tree-switch-conversion.h (struct bit_test_cluster):
        Add m_handles_entire_switch.
2018-08-27  Martin Liska  <mliska@suse.cz>

* gcc.dg/tree-ssa/switch-2.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@263878 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/switch-2.c [new file with mode: 0644]
gcc/tree-switch-conversion.c
gcc/tree-switch-conversion.h