public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/115021] New: [14/15 regression] unnecessary spill for vpternlog
@ 2024-05-10  3:57 liuhongt at gcc dot gnu.org
  2024-05-10 12:35 ` [Bug rtl-optimization/115021] " rguenth at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: liuhongt at gcc dot gnu.org @ 2024-05-10  3:57 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115021
           Summary: [14/15 regression] unnecessary spill for vpternlog
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: liuhongt at gcc dot gnu.org
  Target Milestone: ---

typedef signed char v16qi __attribute__ ((__vector_size__ (16)));
 v16qi foo (v16qi x) { return x >> 5; }

with -march=x86-64-v4 -O2,  GCC 13.2 generates

foo(signed char __vector(16)):
        mov     eax, 4
        vpsraw  xmm2, xmm0, 5
        vpbroadcastb    xmm1, eax
        mov     eax, 7
        vpbroadcastb    xmm3, eax
        vmovdqa xmm0, xmm1
        vpternlogd      xmm0, xmm2, xmm3, 120
        vpsubb  xmm0, xmm0, xmm1
        ret

GCC 14.1 generates

foo(signed char __vector(16)):
        mov     eax, 67372036
        vpsraw  xmm2, xmm0, 5
        vpbroadcastd    xmm1, eax
        mov     eax, 117901063
        vpbroadcastd    xmm3, eax
        vmovdqa xmm0, xmm1
        vmovdqa XMMWORD PTR [rsp-24], xmm3
        vpternlogd      xmm0, xmm2, XMMWORD PTR [rsp-24], 120
        vpsubb  xmm0, xmm0, xmm1
        ret

There's extra spill.

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

end of thread, other threads:[~2024-06-17  8:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-10  3:57 [Bug rtl-optimization/115021] New: [14/15 regression] unnecessary spill for vpternlog liuhongt at gcc dot gnu.org
2024-05-10 12:35 ` [Bug rtl-optimization/115021] " rguenth at gcc dot gnu.org
2024-05-10 15:55 ` roger at nextmovesoftware dot com
2024-05-10 17:01 ` roger at nextmovesoftware dot com
2024-05-20  7:42 ` lin1.hu at intel dot com
2024-05-20  7:49 ` liuhongt at gcc dot gnu.org
2024-06-13 14:14 ` liuhongt at gcc dot gnu.org
2024-06-17  8:51 ` [Bug rtl-optimization/115021] [14 " roger at nextmovesoftware 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).