Re: [PATCH][GCC13] Don't force side effects for hardware vector element broadcast

2022-01-28 Thread Maciej W. Rozycki
On Fri, 28 Jan 2022, Richard Biener wrote: > > that's not what it does. It treats it like > > > > float tem = f; > > return x + { tem, tem, tem, tem }; > > > > avoiding, like for x + (1.0f + f) creating > > > > return x + { 1.0+f, 1.0+f, 1.0+f ...} > > > > it's more CSE than volatile qualif

Re: [PATCH][GCC13] Don't force side effects for hardware vector element broadcast

2022-01-28 Thread Richard Biener via Gcc-patches
On Fri, Jan 28, 2022 at 1:22 PM Richard Biener wrote: > > On Thu, Jan 27, 2022 at 8:14 PM Maciej W. Rozycki wrote: > > > > On Thu, 27 Jan 2022, Richard Biener wrote: > > > > > > > > Index: gcc/gcc/c/c-typeck.cc > > > > > > === > > >

Re: [PATCH][GCC13] Don't force side effects for hardware vector element broadcast

2022-01-28 Thread Richard Biener via Gcc-patches
On Thu, Jan 27, 2022 at 8:14 PM Maciej W. Rozycki wrote: > > On Thu, 27 Jan 2022, Richard Biener wrote: > > > > > > Index: gcc/gcc/c/c-typeck.cc > > > > > === > > > > > --- gcc.orig/gcc/c/c-typeck.cc > > > > > +++ gcc/gcc/c/c-typeck.c

Re: [PATCH][GCC13] Don't force side effects for hardware vector element broadcast

2022-01-27 Thread Maciej W. Rozycki
On Thu, 27 Jan 2022, Richard Biener wrote: > > > > Index: gcc/gcc/c/c-typeck.cc > > > > === > > > > --- gcc.orig/gcc/c/c-typeck.cc > > > > +++ gcc/gcc/c/c-typeck.cc > > > > @@ -49,6 +49,7 @@ along with GCC; see the file COPYING3. > >

Re: [PATCH][GCC13] Don't force side effects for hardware vector element broadcast

2022-01-27 Thread Richard Biener via Gcc-patches
On Thu, Jan 27, 2022 at 2:59 PM Maciej W. Rozycki wrote: > > On Thu, 27 Jan 2022, Richard Biener wrote: > > > > Index: gcc/gcc/c/c-typeck.cc > > > === > > > --- gcc.orig/gcc/c/c-typeck.cc > > > +++ gcc/gcc/c/c-typeck.cc > > > @@ -49,6

Re: [PATCH][GCC13] Don't force side effects for hardware vector element broadcast

2022-01-27 Thread Maciej W. Rozycki
On Thu, 27 Jan 2022, Richard Biener wrote: > > Index: gcc/gcc/c/c-typeck.cc > > === > > --- gcc.orig/gcc/c/c-typeck.cc > > +++ gcc/gcc/c/c-typeck.cc > > @@ -49,6 +49,7 @@ along with GCC; see the file COPYING3. > > #include "gomp-cons

Re: [PATCH][GCC13] Don't force side effects for hardware vector element broadcast

2022-01-27 Thread Richard Biener via Gcc-patches
On Thu, Jan 27, 2022 at 1:16 PM Maciej W. Rozycki wrote: > > Do not mark vector element broadcast resulting from OpenCL operations as > having side effects for targets that have a suitable hardware operation, > so that the `vec_duplicateM' standard RTL pattern can be directly used > for them. Thi

[PATCH][GCC13] Don't force side effects for hardware vector element broadcast

2022-01-27 Thread Maciej W. Rozycki
Do not mark vector element broadcast resulting from OpenCL operations as having side effects for targets that have a suitable hardware operation, so that the `vec_duplicateM' standard RTL pattern can be directly used for them. This does not happen currently, because any RTL pattern named `vec_