Message ID | 20200826022650.1952808-1-ondra.hosek@gmail.com |
---|---|
State | New |
Headers | show |
Series | x86-64: Fix FMA4 detection in ifunc [BZ #26534] | expand |
On Tue, Aug 25, 2020 at 7:27 PM Ondřej Hošek via Libc-alpha <libc-alpha@sourceware.org> wrote: > > A typo in commit 107e6a3c2212ba7a3a4ec7cae8d82d73f7c95d0b causes the > FMA4 code path to be taken on systems that support FMA, even if they do > not support FMA4. Fix this to detect FMA4. > --- > sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h > index 7659758972..e5fd5ac9cb 100644 > --- a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h > +++ b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h > @@ -32,7 +32,7 @@ IFUNC_SELECTOR (void) > && CPU_FEATURE_USABLE_P (cpu_features, AVX2)) > return OPTIMIZE (fma); > > - if (CPU_FEATURE_USABLE_P (cpu_features, FMA)) > + if (CPU_FEATURE_USABLE_P (cpu_features, FMA4)) > return OPTIMIZE (fma4); > > return OPTIMIZE (sse2); > -- > 2.28.0 > LGTM. Thanks.
On 26/08/2020 00:54, H.J. Lu via Libc-alpha wrote: > On Tue, Aug 25, 2020 at 7:27 PM Ondřej Hošek via Libc-alpha > <libc-alpha@sourceware.org> wrote: >> >> A typo in commit 107e6a3c2212ba7a3a4ec7cae8d82d73f7c95d0b causes the >> FMA4 code path to be taken on systems that support FMA, even if they do >> not support FMA4. Fix this to detect FMA4. >> --- >> sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h >> index 7659758972..e5fd5ac9cb 100644 >> --- a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h >> +++ b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h >> @@ -32,7 +32,7 @@ IFUNC_SELECTOR (void) >> && CPU_FEATURE_USABLE_P (cpu_features, AVX2)) >> return OPTIMIZE (fma); >> >> - if (CPU_FEATURE_USABLE_P (cpu_features, FMA)) >> + if (CPU_FEATURE_USABLE_P (cpu_features, FMA4)) >> return OPTIMIZE (fma4); >> >> return OPTIMIZE (sse2); >> -- I think it should be backported to 2.32 as well.
On Wed, Aug 26, 2020 at 5:54 AM H.J. Lu <hjl.tools@gmail.com> wrote: > > On Tue, Aug 25, 2020 at 7:27 PM Ondřej Hošek via Libc-alpha > <libc-alpha@sourceware.org> wrote: > > > > A typo in commit 107e6a3c2212ba7a3a4ec7cae8d82d73f7c95d0b causes the > > FMA4 code path to be taken on systems that support FMA, even if they do > > not support FMA4. Fix this to detect FMA4. > > [...] > > LGTM. > > Thanks. A week has elapsed since the last comment; may I ask you to commit the patch? Thanks! Cheers, ~~ Ondra
On Wed, Sep 2, 2020 at 1:19 AM Ondřej Hošek <ondra.hosek@gmail.com> wrote: > > On Wed, Aug 26, 2020 at 5:54 AM H.J. Lu <hjl.tools@gmail.com> wrote: > > > > On Tue, Aug 25, 2020 at 7:27 PM Ondřej Hošek via Libc-alpha > > <libc-alpha@sourceware.org> wrote: > > > > > > A typo in commit 107e6a3c2212ba7a3a4ec7cae8d82d73f7c95d0b causes the > > > FMA4 code path to be taken on systems that support FMA, even if they do > > > not support FMA4. Fix this to detect FMA4. > > > [...] > > > > LGTM. > > > > Thanks. > > A week has elapsed since the last comment; may I ask you to commit the patch? > > Thanks! > > Cheers, > ~~ Ondra I checked it in for you. Thanks.
On Wed, Sep 2, 2020 at 5:10 AM H.J. Lu <hjl.tools@gmail.com> wrote: > > On Wed, Sep 2, 2020 at 1:19 AM Ondřej Hošek <ondra.hosek@gmail.com> wrote: > > > > On Wed, Aug 26, 2020 at 5:54 AM H.J. Lu <hjl.tools@gmail.com> wrote: > > > > > > On Tue, Aug 25, 2020 at 7:27 PM Ondřej Hošek via Libc-alpha > > > <libc-alpha@sourceware.org> wrote: > > > > > > > > A typo in commit 107e6a3c2212ba7a3a4ec7cae8d82d73f7c95d0b causes the > > > > FMA4 code path to be taken on systems that support FMA, even if they do > > > > not support FMA4. Fix this to detect FMA4. > > > > [...] > > > > > > LGTM. > > > > > > Thanks. > > > > A week has elapsed since the last comment; may I ask you to commit the patch? > > > > Thanks! > > > > Cheers, > > ~~ Ondra > > I checked it in for you. > > Thanks. I am backpoing it to 2.32 branch.
diff --git a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h index 7659758972..e5fd5ac9cb 100644 --- a/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h +++ b/sysdeps/x86_64/fpu/multiarch/ifunc-fma4.h @@ -32,7 +32,7 @@ IFUNC_SELECTOR (void) && CPU_FEATURE_USABLE_P (cpu_features, AVX2)) return OPTIMIZE (fma); - if (CPU_FEATURE_USABLE_P (cpu_features, FMA)) + if (CPU_FEATURE_USABLE_P (cpu_features, FMA4)) return OPTIMIZE (fma4); return OPTIMIZE (sse2);