public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/95341] New: Poor vector_size decomposition when SVE is enabled
@ 2020-05-26 16:44 rsandifo at gcc dot gnu.org
  2020-05-26 16:55 ` [Bug target/95341] " ktkachov at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-05-26 16:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 95341
           Summary: Poor vector_size decomposition when SVE is enabled
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: rsandifo at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64*-*-*

Compiling the following with -O2 -march=armv8-a:

  typedef unsigned int uint_vec __attribute__((vector_size(32)));
  uint_vec f1(uint_vec x, uint_vec y) { return x + y; }

generates nice Advanced SIMD code:

        ld1     {v4.16b - v5.16b}, [x0]
        ld1     {v2.16b - v3.16b}, [x1]
        add     v0.4s, v4.4s, v2.4s
        add     v1.4s, v5.4s, v3.4s
        st1     {v0.16b - v1.16b}, [x8]
        ret

But compiling with -march=armv8.2-a+sve generates extremely bad
scalar code, so bad that I'll spare people's eyes by not quoting
it here.

I haven't yet analysed this or checked whether it's a regression.

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

* [Bug target/95341] Poor vector_size decomposition when SVE is enabled
  2020-05-26 16:44 [Bug target/95341] New: Poor vector_size decomposition when SVE is enabled rsandifo at gcc dot gnu.org
@ 2020-05-26 16:55 ` ktkachov at gcc dot gnu.org
  2020-05-26 17:13 ` ktkachov at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2020-05-26 16:55 UTC (permalink / raw)
  To: gcc-bugs

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

ktkachov at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
                 CC|                            |ktkachov at gcc dot gnu.org
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2020-05-26

--- Comment #1 from ktkachov at gcc dot gnu.org ---
Confirmed.

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

* [Bug target/95341] Poor vector_size decomposition when SVE is enabled
  2020-05-26 16:44 [Bug target/95341] New: Poor vector_size decomposition when SVE is enabled rsandifo at gcc dot gnu.org
  2020-05-26 16:55 ` [Bug target/95341] " ktkachov at gcc dot gnu.org
@ 2020-05-26 17:13 ` ktkachov at gcc dot gnu.org
  2020-05-26 17:21 ` rsandifo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ktkachov at gcc dot gnu.org @ 2020-05-26 17:13 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from ktkachov at gcc dot gnu.org ---
Interestingly, -msve-vector-bits gives good codegen for 128, 256, 512 but bad
for 1024, 2048 and VLA code

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

* [Bug target/95341] Poor vector_size decomposition when SVE is enabled
  2020-05-26 16:44 [Bug target/95341] New: Poor vector_size decomposition when SVE is enabled rsandifo at gcc dot gnu.org
  2020-05-26 16:55 ` [Bug target/95341] " ktkachov at gcc dot gnu.org
  2020-05-26 17:13 ` ktkachov at gcc dot gnu.org
@ 2020-05-26 17:21 ` rsandifo at gcc dot gnu.org
  2020-05-27  7:38 ` rguenth at gcc dot gnu.org
  2024-02-27  8:08 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-05-26 17:21 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
(In reply to ktkachov from comment #2)
> Interestingly, -msve-vector-bits gives good codegen for 128, 256, 512 but
> bad for 1024, 2048 and VLA code
That's because addition is the one operation that we currently support
on unpacked vectors.  For subtraction it's a different story (just 128-bit
and 256-bit is good, as expected).

But the surprising thing for me was that we didn't fall back
to Advanced SIMD in VLA mode...

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

* [Bug target/95341] Poor vector_size decomposition when SVE is enabled
  2020-05-26 16:44 [Bug target/95341] New: Poor vector_size decomposition when SVE is enabled rsandifo at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2020-05-26 17:21 ` rsandifo at gcc dot gnu.org
@ 2020-05-27  7:38 ` rguenth at gcc dot gnu.org
  2024-02-27  8:08 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-05-27  7:38 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |missed-optimization

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Does vector lowering already make a mess out of it?

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

* [Bug target/95341] Poor vector_size decomposition when SVE is enabled
  2020-05-26 16:44 [Bug target/95341] New: Poor vector_size decomposition when SVE is enabled rsandifo at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2020-05-27  7:38 ` rguenth at gcc dot gnu.org
@ 2024-02-27  8:08 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-02-27  8:08 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED
   Target Milestone|---                         |14.0
           See Also|                            |https://gcc.gnu.org/bugzill
                   |                            |a/show_bug.cgi?id=112787

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed by r14-6752-ga3ff76278efe00 for GCC 14.

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

end of thread, other threads:[~2024-02-27  8:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-26 16:44 [Bug target/95341] New: Poor vector_size decomposition when SVE is enabled rsandifo at gcc dot gnu.org
2020-05-26 16:55 ` [Bug target/95341] " ktkachov at gcc dot gnu.org
2020-05-26 17:13 ` ktkachov at gcc dot gnu.org
2020-05-26 17:21 ` rsandifo at gcc dot gnu.org
2020-05-27  7:38 ` rguenth at gcc dot gnu.org
2024-02-27  8:08 ` pinskia 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).