public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/101609] New: no right shift pattern for vector(2) long long on aarch64
@ 2021-07-24  5:31 pinskia at gcc dot gnu.org
  2021-07-24  5:31 ` [Bug target/101609] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-07-24  5:31 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 101609
           Summary: no right shift pattern for vector(2) long long on
                    aarch64
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---
            Target: aarch64*-*-*

Take:
#define SIZE 16
typedef long long veci __attribute__((vector_size(SIZE)));

void f(veci &a, veci &b, veci &c){
  c= a>>b;
}
----- CUT ----
We currently produce:
        ldr     q1, [x1]
        ldr     q0, [x0]
        fmov    d3, d1
        dup     d1, v1.d[1]
        fmov    d2, d0
        dup     d0, v0.d[1]
        neg     d4, d3
        sshl    d4, d2, d4
        neg     d2, d1
        sshl    d2, d0, d2
        fmov    x1, d4
        fmov    x0, d2
        stp     x1, x0, [x2]
        ret
----- CUT ----
But we should be able to do:
        ldr     q0, [x1]
        ldr     q1, [x0]
        neg     v0.2d, v0.2d
        sshl    v0.2d, v1.2d, v0.2d
        str     q0, [x2]

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

end of thread, other threads:[~2021-08-25  2:32 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-24  5:31 [Bug target/101609] New: no right shift pattern for vector(2) long long on aarch64 pinskia at gcc dot gnu.org
2021-07-24  5:31 ` [Bug target/101609] " pinskia at gcc dot gnu.org
2021-07-28 15:54 ` belagod at gcc dot gnu.org
2021-07-29 11:17 ` belagod at gcc dot gnu.org
2021-07-29 14:12 ` belagod at gcc dot gnu.org
2021-08-09 11:55 ` cvs-commit at gcc dot gnu.org
2021-08-09 11:58 ` belagod at gcc dot gnu.org
2021-08-25  2:32 ` 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).