Re: [PATCH v2] Add if-chain to switch conversion pass.

2020-12-01 Thread Richard Biener via Gcc-patches
On Fri, Nov 27, 2020 at 4:07 PM Martin Liška wrote: > > On 11/20/20 3:37 PM, Richard Biener wrote: > > On Fri, Nov 20, 2020 at 9:57 AM Martin Liška wrote: > >> > >> On 11/19/20 3:46 PM, Richard Biener wrote: > >>> OK, so can you send an updated patch? > > > > + tree pos_one = build_int_cst (

Re: [PATCH v2] Add if-chain to switch conversion pass.

2020-11-27 Thread Martin Liška
On 11/20/20 3:37 PM, Richard Biener wrote: On Fri, Nov 20, 2020 at 9:57 AM Martin Liška wrote: On 11/19/20 3:46 PM, Richard Biener wrote: OK, so can you send an updated patch? + tree pos_one = build_int_cst (type, 1); + if (!left->m_has_forward_bb + && !right->m_has_forwar

Re: [PATCH v2] Add if-chain to switch conversion pass.

2020-11-20 Thread Richard Biener via Gcc-patches
On Fri, Nov 20, 2020 at 9:57 AM Martin Liška wrote: > > On 11/19/20 3:46 PM, Richard Biener wrote: > > OK, so can you send an updated patch? + tree pos_one = build_int_cst (type, 1); + if (!left->m_has_forward_bb + && !right->m_has_forward_bb + && left->m_case_bb == righ

Re: [PATCH v2] Add if-chain to switch conversion pass.

2020-11-20 Thread Martin Liška
On 11/19/20 3:46 PM, Richard Biener wrote: OK, so can you send an updated patch? Sure. Martin >From 76e8424bd54d15fb3b2a2bdb4179fa8773500381 Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Fri, 28 Aug 2020 10:26:13 +0200 Subject: [PATCH] Add if-chain to switch conversion pass. gcc/ChangeLo

Re: [PATCH v2] Add if-chain to switch conversion pass.

2020-11-19 Thread Richard Biener via Gcc-patches
On Wed, Nov 18, 2020 at 1:25 PM Martin Liška wrote: > > On 11/16/20 1:21 PM, Richard Biener wrote: > > but the most trivial thing would be to feed the pass the > > balanced-tree generated by switch expansion where I > > would expect us to be able to detect it as the original switch again. > > Well

Re: [PATCH v2] Add if-chain to switch conversion pass.

2020-11-18 Thread Martin Liška
On 11/16/20 1:21 PM, Richard Biener wrote: but the most trivial thing would be to feed the pass the balanced-tree generated by switch expansion where I would expect us to be able to detect it as the original switch again. Well, if we want to support such matching, then please deffer it to a pha

Re: [PATCH v2] Add if-chain to switch conversion pass.

2020-11-16 Thread Richard Biener via Gcc-patches
On Mon, Nov 9, 2020 at 1:26 PM Martin Liška wrote: > > On 11/6/20 1:31 PM, Richard Biener wrote: > > On Fri, Oct 16, 2020 at 4:04 PM Martin Liška wrote: > >> > >> Hello. > >> > >> There's another version of the patch that should be based on what > >> I discussed with Richi and Jakub: > >> > >> -

Re: [PATCH v2] Add if-chain to switch conversion pass.

2020-11-09 Thread Martin Liška
On 11/6/20 1:31 PM, Richard Biener wrote: On Fri, Oct 16, 2020 at 4:04 PM Martin Liška wrote: Hello. There's another version of the patch that should be based on what I discussed with Richi and Jakub: - the first patch introduces a new option -fbit-tests that analogue to -fjump-tables a

Re: [PATCH v2] Add if-chain to switch conversion pass.

2020-11-06 Thread Richard Biener via Gcc-patches
On Fri, Oct 16, 2020 at 4:04 PM Martin Liška wrote: > > Hello. > > There's another version of the patch that should be based on what > I discussed with Richi and Jakub: > > - the first patch introduces a new option -fbit-tests that analogue to > -fjump-tables >and will control the new if-to-s