gcc-10-20211231 is now available

2021-12-31 Thread GCC Administrator via Gcc
Snapshot gcc-10-20211231 is now available on https://gcc.gnu.org/pub/gcc/snapshots/10-20211231/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 10 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch

Re: [PATCH] x86-64: Optimize memset for zeroing

2021-12-31 Thread H.J. Lu via Gcc
On Fri, Dec 31, 2021 at 2:19 PM Noah Goldstein wrote: > > On Fri, Dec 31, 2021 at 4:14 PM Noah Goldstein > wrote: > > > > On Fri, Dec 31, 2021 at 2:36 PM H.J. Lu wrote: > > > > > > On Fri, Dec 31, 2021 at 12:21 PM Noah Goldstein > > > wrote: > > > > > > > > On Fri, Dec 31, 2021 at 12:20 PM H.

Re: [PATCH] x86-64: Optimize memset for zeroing

2021-12-31 Thread Noah Goldstein via Gcc
On Fri, Dec 31, 2021 at 4:14 PM Noah Goldstein wrote: > > On Fri, Dec 31, 2021 at 2:36 PM H.J. Lu wrote: > > > > On Fri, Dec 31, 2021 at 12:21 PM Noah Goldstein > > wrote: > > > > > > On Fri, Dec 31, 2021 at 12:20 PM H.J. Lu wrote: > > > > > > > > Update MEMSET_VDUP_TO_VEC0_AND_SET_RETURN to u

Re: [PATCH] x86-64: Optimize memset for zeroing

2021-12-31 Thread Noah Goldstein via Gcc
On Fri, Dec 31, 2021 at 2:36 PM H.J. Lu wrote: > > On Fri, Dec 31, 2021 at 12:21 PM Noah Goldstein > wrote: > > > > On Fri, Dec 31, 2021 at 12:20 PM H.J. Lu wrote: > > > > > > Update MEMSET_VDUP_TO_VEC0_AND_SET_RETURN to use PXOR, which has lower > > > lantency and higher throughput than VPBROA

Re: [PATCH] x86-64: Optimize memset for zeroing

2021-12-31 Thread Florian Weimer
* Noah Goldstein: >> >> bzero does not have the interface ambiguity that bcmp has. So the >> >> only reason for not using it would be namespace cleanliness. >> > >> > bzero isn't a standard C function and it isn't optimized like memset >> > in glibc. > > It could be an issue if the "optimization"

Re: [PATCH] x86-64: Optimize memset for zeroing

2021-12-31 Thread Noah Goldstein via Gcc
On Fri, Dec 31, 2021 at 3:02 PM Florian Weimer wrote: > > * H. J. Lu: > > > On Fri, Dec 31, 2021 at 12:43 PM Florian Weimer wrote: > >> > >> * H. J. Lu via Libc-alpha: > >> > >> > bzero is an alias of SSE2 memset in glibc. Should we add __memsetzero > >> > like __memcmpeq? It should be almost

Re: [PATCH] x86-64: Optimize memset for zeroing

2021-12-31 Thread Florian Weimer
* H. J. Lu: > On Fri, Dec 31, 2021 at 12:43 PM Florian Weimer wrote: >> >> * H. J. Lu via Libc-alpha: >> >> > bzero is an alias of SSE2 memset in glibc. Should we add __memsetzero >> > like __memcmpeq? It should be almost free in glibc. GCC can use >> > __memsetzero if it is available. >> >>

Re: [PATCH] x86-64: Optimize memset for zeroing

2021-12-31 Thread H.J. Lu via Gcc
On Fri, Dec 31, 2021 at 12:43 PM Florian Weimer wrote: > > * H. J. Lu via Libc-alpha: > > > bzero is an alias of SSE2 memset in glibc. Should we add __memsetzero > > like __memcmpeq? It should be almost free in glibc. GCC can use > > __memsetzero if it is available. > > bzero does not have the

Re: [PATCH] x86-64: Optimize memset for zeroing

2021-12-31 Thread Florian Weimer
* H. J. Lu via Libc-alpha: > bzero is an alias of SSE2 memset in glibc. Should we add __memsetzero > like __memcmpeq? It should be almost free in glibc. GCC can use > __memsetzero if it is available. bzero does not have the interface ambiguity that bcmp has. So the only reason for not using

Re: [PATCH] x86-64: Optimize memset for zeroing

2021-12-31 Thread H.J. Lu via Gcc
On Fri, Dec 31, 2021 at 12:21 PM Noah Goldstein wrote: > > On Fri, Dec 31, 2021 at 12:20 PM H.J. Lu wrote: > > > > Update MEMSET_VDUP_TO_VEC0_AND_SET_RETURN to use PXOR, which has lower > > lantency and higher throughput than VPBROADCAST, for zero constant. > > Since the most common usage of mems

Re: Weird behaviour (bug?) of __builtin_nans()

2021-12-31 Thread FX via Gcc
Hi Joseph, > 1. You should use -fsignaling-nans if you want signaling NaNs to work > correctly. Thanks, we’ll compile the libgfortran parts that are IEEE-related with that from now on. Sounds like a good idea, anyway. > 3. There is probably a reasonable case for interpreting such conversions

Re: Weird behaviour (bug?) of __builtin_nans()

2021-12-31 Thread Joseph Myers
On Fri, 31 Dec 2021, FX via Gcc wrote: > The reason I ended up in this rabbit hole is that I am implementing some > handling of signalling NaNs in libgfortran. Could someone either confirm > that the behavior observed above is a bug, or if not, kindly explain to > me why it happens? 1. You sho

Weird behaviour (bug?) of __builtin_nans()

2021-12-31 Thread FX via Gcc
Hi, I think I’ve found a bug in the handling of __builtin_nans() in GCC, but I am aware that this is a tricky area, so before claiming so I would like to check with the experts. Consider the following code: $ cat v.c #include #include #if 1 typedef double GFC_REAL_8; #else #define GFC_REAL_