Re: [PATCH] VEC_COND_EXPR: clean up first argument

2020-06-25 Thread Martin Liška
On 6/24/20 4:15 PM, Richard Biener wrote: On Wed, Jun 24, 2020 at 11:27 AM Martin Liška wrote: On 6/24/20 11:09 AM, Richard Biener wrote: On Wed, Jun 24, 2020 at 10:49 AM Martin Liška wrote: On 6/24/20 9:43 AM, Richard Biener wrote: Hmm, can you instead use simple_dce_from_worklist and si

Re: [PATCH] VEC_COND_EXPR: clean up first argument

2020-06-24 Thread Richard Biener via Gcc-patches
On Wed, Jun 24, 2020 at 11:27 AM Martin Liška wrote: > > On 6/24/20 11:09 AM, Richard Biener wrote: > > On Wed, Jun 24, 2020 at 10:49 AM Martin Liška wrote: > >> > >> On 6/24/20 9:43 AM, Richard Biener wrote: > >>> Hmm, can you instead use simple_dce_from_worklist and simply > >>> record all SSA_

Re: [PATCH] VEC_COND_EXPR: clean up first argument

2020-06-24 Thread Martin Liška
On 6/24/20 11:09 AM, Richard Biener wrote: On Wed, Jun 24, 2020 at 10:49 AM Martin Liška wrote: On 6/24/20 9:43 AM, Richard Biener wrote: Hmm, can you instead use simple_dce_from_worklist and simply record all SSA_NAMEs you end up "forwarding" as possibly dead in a bitmap? At least that hash

Re: [PATCH] VEC_COND_EXPR: clean up first argument

2020-06-24 Thread Richard Biener via Gcc-patches
On Wed, Jun 24, 2020 at 10:49 AM Martin Liška wrote: > > On 6/24/20 9:43 AM, Richard Biener wrote: > > Hmm, can you instead use simple_dce_from_worklist and simply > > record all SSA_NAMEs you end up "forwarding" as possibly dead > > in a bitmap? At least that hashmap traversal looks dangerous >

Re: [PATCH] VEC_COND_EXPR: clean up first argument

2020-06-24 Thread Martin Liška
n Liska Date: Wed, 24 Jun 2020 08:08:00 +0200 Subject: [PATCH] VEC_COND_EXPR: clean up first argument gcc/ChangeLog: PR tree-optimization/95745 PR middle-end/95830 * gimple-isel.cc (gimple_expand_vec_cond_exprs): Delete dead SSA_NAMEs used as the first argument of a VEC_COND_EXPR. Alw

Re: [PATCH] VEC_COND_EXPR: clean up first argument

2020-06-24 Thread Richard Biener via Gcc-patches
On Wed, Jun 24, 2020 at 9:21 AM Martin Liška wrote: > > Hi. > > When expanding a VEC_COND_EXPR it happens that first argument (a SSA_NAME) > that can be no longer used. When that happens we need to remove the SSA_NAME, > otherwise we end up expanding it and for targets like s390x, there's no optab

[PATCH] VEC_COND_EXPR: clean up first argument

2020-06-24 Thread Martin Liška
Hi. When expanding a VEC_COND_EXPR it happens that first argument (a SSA_NAME) that can be no longer used. When that happens we need to remove the SSA_NAME, otherwise we end up expanding it and for targets like s390x, there's no optab expansion. We need to remove them at both places as -O0 does n