On 12/1/20 6:57 AM, Martin Liška wrote:
> Hello.
>
> The following patch is a small tweak than enables more opportunities.
> It fixes bug in PR88702 and I see 54 transformations to happen in SPEC
> 2006.
> Apart from that, I fixed a minor issues which I spotted during bootstrap.
>
> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>
> Ready to be installed?
> Thanks,
> Martin
>
> 0001-if-to-switch-Support-chain-with-2-BBs.patch
>
> From a27dca2d5ef87b493d1ab50da68d0b24dc9fdd93 Mon Sep 17 00:00:00 2001
> From: Martin Liska <mli...@suse.cz>
> Date: Tue, 1 Dec 2020 12:18:46 +0100
> Subject: [PATCH] if-to-switch: Support chain with 2 BBs.
>
> As seen in the test-case, even 2 BBs can handle interesting
> cases covered by a jump table or a bit-test.
>
> gcc/ChangeLog:
>
>       PR tree-optimization/88702
>       * gimple-if-to-switch.cc (pass_if_to_switch::execute):
>       Require at least 2 BBs.
>       * gimple-if-to-switch.cc (find_conditions): Require
>       equal precision for low and high of a range.
>
> gcc/testsuite/ChangeLog:
>
>       PR tree-optimization/88702
>       * gcc.dg/tree-ssa/if-to-switch-9.c: New test.
OK
jeff

Reply via email to