Re: Ping: [PATCH] libatomic: x86_64: Always try ifunc

2023-06-09 Thread Jakub Jelinek via Gcc-patches
On Fri, Jun 09, 2023 at 08:37:20PM +0800, Xi Ruoyao wrote: > Ping (in hopes that someone can review before the weekend). > > On Sat, 2023-06-03 at 19:25 +0800, Xi Ruoyao wrote: > > We used to skip ifunc check when CX16 is available.  But now we use > > CX16+AVX+Intel/AMD for the "perfect" 16b

Ping: [PATCH] libatomic: x86_64: Always try ifunc

2023-06-09 Thread Xi Ruoyao via Gcc-patches
Ping (in hopes that someone can review before the weekend). On Sat, 2023-06-03 at 19:25 +0800, Xi Ruoyao wrote: > We used to skip ifunc check when CX16 is available.  But now we use > CX16+AVX+Intel/AMD for the "perfect" 16b load implementation, so CX16 > alone is not a sufficient reason not to

Re: [PATCH] libatomic: x86_64: Always try ifunc

2023-06-03 Thread Bernhard Reutner-Fischer via Gcc-patches
On 3 June 2023 15:46:02 CEST, Xi Ruoyao wrote: >Unfortunately __builtin_cpu_is performs CPU detection on runtime, not >compile time. Right, you were talking about configure, sorry.

Re: [PATCH] libatomic: x86_64: Always try ifunc

2023-06-03 Thread Xi Ruoyao via Gcc-patches
On Sat, 2023-06-03 at 14:53 +0200, Bernhard Reutner-Fischer wrote: > On 3 June 2023 13:25:32 CEST, Xi Ruoyao via Gcc-patches > wrote: > > > There seems no good way to check if the CPU is Intel or AMD from > > the built-in macros (maybe we can check every known model like > > __skylake, > >

Re: [PATCH] libatomic: x86_64: Always try ifunc

2023-06-03 Thread Bernhard Reutner-Fischer via Gcc-patches
On 3 June 2023 13:25:32 CEST, Xi Ruoyao via Gcc-patches wrote: >There seems no good way to check if the CPU is Intel or AMD from >the built-in macros (maybe we can check every known model like __skylake, >__bdver2, ..., but it will be very error-prune and require an update >whenever we add the

[PATCH] libatomic: x86_64: Always try ifunc

2023-06-03 Thread Xi Ruoyao via Gcc-patches
We used to skip ifunc check when CX16 is available. But now we use CX16+AVX+Intel/AMD for the "perfect" 16b load implementation, so CX16 alone is not a sufficient reason not to use ifunc (see PR104688). This causes a subtle and annoying issue: when GCC is built with a higher -march= setting in