public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/114607] New: aarch64: Incorrect expansion of svsudot
@ 2024-04-05 16:14 rsandifo at gcc dot gnu.org
  2024-04-05 16:15 ` [Bug target/114607] " rsandifo at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2024-04-05 16:14 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 114607
           Summary: aarch64: Incorrect expansion of svsudot
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: wrong-code
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rsandifo at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64*-*-*

svsudot is supposed to expand to USDOT with the second and third arguments
swapped.  However, there is a thinko in the code that does the reversal, making
it a no-op.  Unfortunately, the tests simply accept the buggy form. :-(

For example, gcc.target/aarch64/sve/acle/asm/sudot_s32.c contains:

/*
** sudot_s32_tied1:
**      usdot   z0\.s, z2\.b, z4\.b
**      ret
*/
TEST_TRIPLE_Z (sudot_s32_tied1, svint32_t, svint8_t, svuint8_t,
               z0 = svsudot_s32 (z0, z2, z4),
               z0 = svsudot (z0, z2, z4))

where the usdot z2 and z4 operands should be in the opposite order.

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

* [Bug target/114607] aarch64: Incorrect expansion of svsudot
  2024-04-05 16:14 [Bug target/114607] New: aarch64: Incorrect expansion of svsudot rsandifo at gcc dot gnu.org
@ 2024-04-05 16:15 ` rsandifo at gcc dot gnu.org
  2024-04-08 15:53 ` cvs-commit at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2024-04-05 16:15 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Sandiford <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rsandifo at gcc dot gnu.org
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2024-04-05
     Ever confirmed|0                           |1

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

* [Bug target/114607] aarch64: Incorrect expansion of svsudot
  2024-04-05 16:14 [Bug target/114607] New: aarch64: Incorrect expansion of svsudot rsandifo at gcc dot gnu.org
  2024-04-05 16:15 ` [Bug target/114607] " rsandifo at gcc dot gnu.org
@ 2024-04-08 15:53 ` cvs-commit at gcc dot gnu.org
  2024-04-08 15:59 ` rsandifo at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-04-08 15:53 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The trunk branch has been updated by Richard Sandiford <rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:2c1c2485a4b1aca746ac693041e51ea6da5c64ca

commit r14-9836-g2c1c2485a4b1aca746ac693041e51ea6da5c64ca
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Mon Apr 8 16:53:32 2024 +0100

    aarch64: Fix expansion of svsudot [PR114607]

    Not sure how this happend, but: svsudot is supposed to be expanded
    as USDOT with the operands swapped.  However, a thinko in the
    expansion of svsudot meant that the arguments weren't in fact
    swapped; the attempted swap was just a no-op.  And the testcases
    blithely accepted that.

    gcc/
            PR target/114607
            * config/aarch64/aarch64-sve-builtins-base.cc
            (svusdot_impl::expand): Fix botched attempt to swap the operands
            for svsudot.

    gcc/testsuite/
            PR target/114607
            * gcc.target/aarch64/sve/acle/asm/sudot_s32.c: New test.

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

* [Bug target/114607] aarch64: Incorrect expansion of svsudot
  2024-04-05 16:14 [Bug target/114607] New: aarch64: Incorrect expansion of svsudot rsandifo at gcc dot gnu.org
  2024-04-05 16:15 ` [Bug target/114607] " rsandifo at gcc dot gnu.org
  2024-04-08 15:53 ` cvs-commit at gcc dot gnu.org
@ 2024-04-08 15:59 ` rsandifo at gcc dot gnu.org
  2024-07-31 11:48 ` ktkachov at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2024-04-08 15:59 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
Fixed on trunk.  I'll backport in a few weeks if there's no fallout.

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

* [Bug target/114607] aarch64: Incorrect expansion of svsudot
  2024-04-05 16:14 [Bug target/114607] New: aarch64: Incorrect expansion of svsudot rsandifo at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-04-08 15:59 ` rsandifo at gcc dot gnu.org
@ 2024-07-31 11:48 ` ktkachov at gcc dot gnu.org
  2024-08-16  6:58 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2024-07-31 11:48 UTC (permalink / raw)
  To: gcc-bugs

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

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktkachov at gcc dot gnu.org

--- Comment #3 from ktkachov at gcc dot gnu.org ---
Does this still need backporting?

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

* [Bug target/114607] aarch64: Incorrect expansion of svsudot
  2024-04-05 16:14 [Bug target/114607] New: aarch64: Incorrect expansion of svsudot rsandifo at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-07-31 11:48 ` ktkachov at gcc dot gnu.org
@ 2024-08-16  6:58 ` cvs-commit at gcc dot gnu.org
  2024-08-16 14:38 ` cvs-commit at gcc dot gnu.org
  2024-08-16 14:41 ` rsandifo at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-08-16  6:58 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-13 branch has been updated by Richard Sandiford
<rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:22c6a11686d3f20f8682c2fbe9e33867a7e8af0e

commit r13-8976-g22c6a11686d3f20f8682c2fbe9e33867a7e8af0e
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Fri Aug 16 07:58:24 2024 +0100

    aarch64: Fix expansion of svsudot [PR114607]

    Not sure how this happend, but: svsudot is supposed to be expanded
    as USDOT with the operands swapped.  However, a thinko in the
    expansion of svsudot meant that the arguments weren't in fact
    swapped; the attempted swap was just a no-op.  And the testcases
    blithely accepted that.

    gcc/
            PR target/114607
            * config/aarch64/aarch64-sve-builtins-base.cc
            (svusdot_impl::expand): Fix botched attempt to swap the operands
            for svsudot.

    gcc/testsuite/
            PR target/114607
            * gcc.target/aarch64/sve/acle/asm/sudot_s32.c: New test.

    (cherry picked from commit 2c1c2485a4b1aca746ac693041e51ea6da5c64ca)

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

* [Bug target/114607] aarch64: Incorrect expansion of svsudot
  2024-04-05 16:14 [Bug target/114607] New: aarch64: Incorrect expansion of svsudot rsandifo at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-08-16  6:58 ` cvs-commit at gcc dot gnu.org
@ 2024-08-16 14:38 ` cvs-commit at gcc dot gnu.org
  2024-08-16 14:41 ` rsandifo at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-08-16 14:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The releases/gcc-12 branch has been updated by Richard Sandiford
<rsandifo@gcc.gnu.org>:

https://gcc.gnu.org/g:2d1b1f404f3361a0e3d9d2a2bee5cf68c1290fe5

commit r12-10673-g2d1b1f404f3361a0e3d9d2a2bee5cf68c1290fe5
Author: Richard Sandiford <richard.sandiford@arm.com>
Date:   Fri Aug 16 15:37:50 2024 +0100

    aarch64: Fix expansion of svsudot [PR114607]

    Not sure how this happend, but: svsudot is supposed to be expanded
    as USDOT with the operands swapped.  However, a thinko in the
    expansion of svsudot meant that the arguments weren't in fact
    swapped; the attempted swap was just a no-op.  And the testcases
    blithely accepted that.

    gcc/
            PR target/114607
            * config/aarch64/aarch64-sve-builtins-base.cc
            (svusdot_impl::expand): Fix botched attempt to swap the operands
            for svsudot.

    gcc/testsuite/
            PR target/114607
            * gcc.target/aarch64/sve/acle/asm/sudot_s32.c: New test.

    (cherry picked from commit 2c1c2485a4b1aca746ac693041e51ea6da5c64ca)

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

* [Bug target/114607] aarch64: Incorrect expansion of svsudot
  2024-04-05 16:14 [Bug target/114607] New: aarch64: Incorrect expansion of svsudot rsandifo at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-08-16 14:38 ` cvs-commit at gcc dot gnu.org
@ 2024-08-16 14:41 ` rsandifo at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2024-08-16 14:41 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Sandiford <rsandifo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |12.4.1, 13.3.1, 14.1.0,
                   |                            |15.0
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #6 from Richard Sandiford <rsandifo at gcc dot gnu.org> ---
Fixed on all active branches.

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

end of thread, other threads:[~2024-08-16 14:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-05 16:14 [Bug target/114607] New: aarch64: Incorrect expansion of svsudot rsandifo at gcc dot gnu.org
2024-04-05 16:15 ` [Bug target/114607] " rsandifo at gcc dot gnu.org
2024-04-08 15:53 ` cvs-commit at gcc dot gnu.org
2024-04-08 15:59 ` rsandifo at gcc dot gnu.org
2024-07-31 11:48 ` ktkachov at gcc dot gnu.org
2024-08-16  6:58 ` cvs-commit at gcc dot gnu.org
2024-08-16 14:38 ` cvs-commit at gcc dot gnu.org
2024-08-16 14:41 ` rsandifo at gcc dot gnu.org

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).