Re: [14/n] PR85694: Rework overwidening detection

2018-07-04 Thread Richard Sandiford
Christophe Lyon writes: > On Tue, 3 Jul 2018 at 12:02, Richard Sandiford > wrote: >> >> Richard Biener writes: >> > On Fri, Jun 29, 2018 at 1:36 PM Richard Sandiford >> > wrote: >> >> >> >> Richard Sandiford writes: >> >> > This patch is the main part of PR85694. The aim is to recognise > at

Re: [14/n] PR85694: Rework overwidening detection

2018-07-03 Thread Rainer Orth
Hi Christophe, > It seems the new bb-slp-over-widen tests lack a -fdump option: > gcc.dg/vect/bb-slp-over-widen-2.c -flto -ffat-lto-objects : dump file > does not exist > UNRESOLVED: gcc.dg/vect/bb-slp-over-widen-2.c -flto -ffat-lto-objects > scan-tree-dump-times vect "basic block vectorized" 2 i

Re: [14/n] PR85694: Rework overwidening detection

2018-07-03 Thread Christophe Lyon
On Tue, 3 Jul 2018 at 12:02, Richard Sandiford wrote: > > Richard Biener writes: > > On Fri, Jun 29, 2018 at 1:36 PM Richard Sandiford > > wrote: > >> > >> Richard Sandiford writes: > >> > This patch is the main part of PR85694. The aim is to recognise at > >> > least: > >> > > >> > signed

Re: [14/n] PR85694: Rework overwidening detection

2018-07-03 Thread Richard Sandiford
Richard Biener writes: > On Fri, Jun 29, 2018 at 1:36 PM Richard Sandiford > wrote: >> >> Richard Sandiford writes: >> > This patch is the main part of PR85694. The aim is to recognise at least: >> > >> > signed char *a, *b, *c; >> > ... >> > for (int i = 0; i < 2048; i++) >> > c[i] =

Re: [14/n] PR85694: Rework overwidening detection

2018-07-02 Thread Christophe Lyon
On Mon, 2 Jul 2018 at 15:37, Richard Sandiford wrote: > > Christophe Lyon writes: > > On Fri, 29 Jun 2018 at 13:36, Richard Sandiford > > wrote: > >> > >> Richard Sandiford writes: > >> > This patch is the main part of PR85694. The aim is to recognise at > >> > least: > >> > > >> > signed c

Re: [14/n] PR85694: Rework overwidening detection

2018-07-02 Thread Richard Sandiford
Christophe Lyon writes: > On Fri, 29 Jun 2018 at 13:36, Richard Sandiford > wrote: >> >> Richard Sandiford writes: >> > This patch is the main part of PR85694. The aim is to recognise at least: >> > >> > signed char *a, *b, *c; >> > ... >> > for (int i = 0; i < 2048; i++) >> > c[i] =

Re: [14/n] PR85694: Rework overwidening detection

2018-07-02 Thread Richard Biener
On Fri, Jun 29, 2018 at 1:36 PM Richard Sandiford wrote: > > Richard Sandiford writes: > > This patch is the main part of PR85694. The aim is to recognise at least: > > > > signed char *a, *b, *c; > > ... > > for (int i = 0; i < 2048; i++) > > c[i] = (a[i] + b[i]) >> 1; > > > > as an o

Re: [14/n] PR85694: Rework overwidening detection

2018-07-02 Thread Christophe Lyon
On Fri, 29 Jun 2018 at 13:36, Richard Sandiford wrote: > > Richard Sandiford writes: > > This patch is the main part of PR85694. The aim is to recognise at least: > > > > signed char *a, *b, *c; > > ... > > for (int i = 0; i < 2048; i++) > > c[i] = (a[i] + b[i]) >> 1; > > > > as an ove

Re: [14/n] PR85694: Rework overwidening detection

2018-06-29 Thread Richard Sandiford
Richard Sandiford writes: > This patch is the main part of PR85694. The aim is to recognise at least: > > signed char *a, *b, *c; > ... > for (int i = 0; i < 2048; i++) > c[i] = (a[i] + b[i]) >> 1; > > as an over-widening pattern, since the addition and shift can be done > on shorts rat

[14/n] PR85694: Rework overwidening detection

2018-06-20 Thread Richard Sandiford
This patch is the main part of PR85694. The aim is to recognise at least: signed char *a, *b, *c; ... for (int i = 0; i < 2048; i++) c[i] = (a[i] + b[i]) >> 1; as an over-widening pattern, since the addition and shift can be done on shorts rather than ints. However, it ended up being