public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug math/31335] New: Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version
@ 2024-02-04  2:41 hjl.tools at gmail dot com
  2024-02-05 15:08 ` [Bug math/31335] " fweimer at redhat dot com
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2024-02-04  2:41 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31335

            Bug ID: 31335
           Summary: Compile glibc with -march=x86-64-v3 should disable
                    FMA4 multi-arch version
           Product: glibc
           Version: 2.39
            Status: NEW
          Severity: normal
          Priority: P2
         Component: math
          Assignee: unassigned at sourceware dot org
          Reporter: hjl.tools at gmail dot com
  Target Milestone: ---
            Target: x86-64

When building glibc with -march=x86-64-v3 or high, the resulting
glibc won't run on FMA4 processors.  FMA4 multi-arch version should
be disabled in this case.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug math/31335] Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version
  2024-02-04  2:41 [Bug math/31335] New: Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version hjl.tools at gmail dot com
@ 2024-02-05 15:08 ` fweimer at redhat dot com
  2024-02-05 15:15 ` hjl.tools at gmail dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: fweimer at redhat dot com @ 2024-02-05 15:08 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31335

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fweimer at redhat dot com

--- Comment #1 from Florian Weimer <fweimer at redhat dot com> ---
I believe s390x has some facilities for that already. It would be nice if they
could match.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug math/31335] Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version
  2024-02-04  2:41 [Bug math/31335] New: Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version hjl.tools at gmail dot com
  2024-02-05 15:08 ` [Bug math/31335] " fweimer at redhat dot com
@ 2024-02-05 15:15 ` hjl.tools at gmail dot com
  2024-02-25 23:17 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2024-02-05 15:15 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31335

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |skpgkp2 at gmail dot com

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug math/31335] Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version
  2024-02-04  2:41 [Bug math/31335] New: Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version hjl.tools at gmail dot com
  2024-02-05 15:08 ` [Bug math/31335] " fweimer at redhat dot com
  2024-02-05 15:15 ` hjl.tools at gmail dot com
@ 2024-02-25 23:17 ` cvs-commit at gcc dot gnu.org
  2024-04-04  6:15 ` fweimer at redhat dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-02-25 23:17 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31335

--- Comment #2 from Sourceware Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Sunil Pandey <skpgkp2@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=9f78a7c1d0963282608da836b840f0d5ae1c478e

commit 9f78a7c1d0963282608da836b840f0d5ae1c478e
Author: Sunil K Pandey <skpgkp2@gmail.com>
Date:   Tue Feb 13 12:23:14 2024 -0800

    x86_64: Exclude SSE, AVX and FMA4 variants in libm multiarch

    When glibc is built with ISA level 3 or higher by default, the resulting
    glibc binaries won't run on SSE or FMA4 processors.  Exclude SSE, AVX and
    FMA4 variants in libm multiarch when ISA level 3 or higher is enabled by
    default.

    When glibc is built with ISA level 2 enabled by default, only keep SSE4.1
    variant.

    Fixes BZ 31335.

    NB: elf/tst-valgrind-smoke test fails with ISA level 4, because valgrind
    doesn't support AVX512 instructions:

    https://bugs.kde.org/show_bug.cgi?id=383010

    Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug math/31335] Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version
  2024-02-04  2:41 [Bug math/31335] New: Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version hjl.tools at gmail dot com
                   ` (2 preceding siblings ...)
  2024-02-25 23:17 ` cvs-commit at gcc dot gnu.org
@ 2024-04-04  6:15 ` fweimer at redhat dot com
  2024-04-04 13:12 ` hjl.tools at gmail dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: fweimer at redhat dot com @ 2024-04-04  6:15 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31335

--- Comment #3 from Florian Weimer <fweimer at redhat dot com> ---
Has this bug been fixed?

I ran into this issue while trying to build glibc with -mapxf. This option is
logically incompatible with -mfma4, although not rejected by GCC. I don't
expect there to be any hardware that supports this combination, and GCC
generates assembly that is incompatible with GAS:

/tmp/ccuidrGh.s: Assembler messages:
/tmp/ccuidrGh.s:451: Error: extended GPR cannot be used as base/index for
`vfmaddsd'
/tmp/ccuidrGh.s:702: Error: extended GPR cannot be used as base/index for
`vfmaddsd'
/tmp/ccuidrGh.s:821: Error: extended GPR cannot be used as base/index for
`vfmaddsd'
/tmp/ccuidrGh.s:1449: Error: extended GPR cannot be used as base/index for
`vfmaddsd'
/tmp/ccuidrGh.s:1591: Error: extended GPR cannot be used as base/index for
`vfmaddsd'
/tmp/ccuidrGh.s:1709: Error: extended GPR cannot be used as base/index for
`vfmaddsd'

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug math/31335] Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version
  2024-02-04  2:41 [Bug math/31335] New: Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version hjl.tools at gmail dot com
                   ` (3 preceding siblings ...)
  2024-04-04  6:15 ` fweimer at redhat dot com
@ 2024-04-04 13:12 ` hjl.tools at gmail dot com
  2024-04-04 13:36 ` hjl.tools at gmail dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2024-04-04 13:12 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31335

--- Comment #4 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Florian Weimer from comment #3)
> Has this bug been fixed?
> 
> I ran into this issue while trying to build glibc with -mapxf. This option
> is logically incompatible with -mfma4, although not rejected by GCC. I don't
> expect there to be any hardware that supports this combination, and GCC
> generates assembly that is incompatible with GAS:
> 
> /tmp/ccuidrGh.s: Assembler messages:
> /tmp/ccuidrGh.s:451: Error: extended GPR cannot be used as base/index for
> `vfmaddsd'
> /tmp/ccuidrGh.s:702: Error: extended GPR cannot be used as base/index for
> `vfmaddsd'
> /tmp/ccuidrGh.s:821: Error: extended GPR cannot be used as base/index for
> `vfmaddsd'
> /tmp/ccuidrGh.s:1449: Error: extended GPR cannot be used as base/index for
> `vfmaddsd'
> /tmp/ccuidrGh.s:1591: Error: extended GPR cannot be used as base/index for
> `vfmaddsd'
> /tmp/ccuidrGh.s:1709: Error: extended GPR cannot be used as base/index for
> `vfmaddsd'

I can't reproduce it with glibc master branch, GCC 14 and binutils 2.42.
What are your configure and build options?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug math/31335] Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version
  2024-02-04  2:41 [Bug math/31335] New: Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version hjl.tools at gmail dot com
                   ` (4 preceding siblings ...)
  2024-04-04 13:12 ` hjl.tools at gmail dot com
@ 2024-04-04 13:36 ` hjl.tools at gmail dot com
  2024-04-04 14:36 ` hjl.tools at gmail dot com
  2024-04-14 13:37 ` hjl.tools at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2024-04-04 13:36 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31335

--- Comment #5 from H.J. Lu <hjl.tools at gmail dot com> ---
(In reply to Florian Weimer from comment #3)
> Has this bug been fixed?
> 
> I ran into this issue while trying to build glibc with -mapxf. This option
> is logically incompatible with -mfma4, although not rejected by GCC. I don't
> expect there to be any hardware that supports this combination, and GCC
> generates assembly that is incompatible with GAS:
> 
> /tmp/ccuidrGh.s: Assembler messages:
> /tmp/ccuidrGh.s:451: Error: extended GPR cannot be used as base/index for
> `vfmaddsd'
> /tmp/ccuidrGh.s:702: Error: extended GPR cannot be used as base/index for
> `vfmaddsd'
> /tmp/ccuidrGh.s:821: Error: extended GPR cannot be used as base/index for
> `vfmaddsd'
> /tmp/ccuidrGh.s:1449: Error: extended GPR cannot be used as base/index for
> `vfmaddsd'
> /tmp/ccuidrGh.s:1591: Error: extended GPR cannot be used as base/index for
> `vfmaddsd'
> /tmp/ccuidrGh.s:1709: Error: extended GPR cannot be used as base/index for
> `vfmaddsd'

I can reproduce it.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug math/31335] Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version
  2024-02-04  2:41 [Bug math/31335] New: Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version hjl.tools at gmail dot com
                   ` (5 preceding siblings ...)
  2024-04-04 13:36 ` hjl.tools at gmail dot com
@ 2024-04-04 14:36 ` hjl.tools at gmail dot com
  2024-04-14 13:37 ` hjl.tools at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2024-04-04 14:36 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31335

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=114587

--- Comment #6 from H.J. Lu <hjl.tools at gmail dot com> ---
GCC should define a macro for -mapxf:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114587

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug math/31335] Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version
  2024-02-04  2:41 [Bug math/31335] New: Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version hjl.tools at gmail dot com
                   ` (6 preceding siblings ...)
  2024-04-04 14:36 ` hjl.tools at gmail dot com
@ 2024-04-14 13:37 ` hjl.tools at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: hjl.tools at gmail dot com @ 2024-04-14 13:37 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=31335

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
   Target Milestone|---                         |2.40
             Status|NEW                         |RESOLVED

--- Comment #7 from H.J. Lu <hjl.tools at gmail dot com> ---
Fixed for 2.40 and 2.39 branch.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-04-14 13:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04  2:41 [Bug math/31335] New: Compile glibc with -march=x86-64-v3 should disable FMA4 multi-arch version hjl.tools at gmail dot com
2024-02-05 15:08 ` [Bug math/31335] " fweimer at redhat dot com
2024-02-05 15:15 ` hjl.tools at gmail dot com
2024-02-25 23:17 ` cvs-commit at gcc dot gnu.org
2024-04-04  6:15 ` fweimer at redhat dot com
2024-04-04 13:12 ` hjl.tools at gmail dot com
2024-04-04 13:36 ` hjl.tools at gmail dot com
2024-04-04 14:36 ` hjl.tools at gmail dot com
2024-04-14 13:37 ` hjl.tools at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).