public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/107812] New: [11/12/13 Regression] RTL SSA forwprop introduced regression
@ 2022-11-22 12:54 jakub at gcc dot gnu.org
  2022-11-22 12:54 ` [Bug target/107812] [11/12/13 Regression] RTL SSA forwprop introduced regression since r11-6188 jakub at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: jakub at gcc dot gnu.org @ 2022-11-22 12:54 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 107812
           Summary: [11/12/13 Regression] RTL SSA forwprop introduced
                    regression
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: jakub at gcc dot gnu.org
                CC: crazylht at gmail dot com, hjl.tools at gmail dot com,
                    jakub at gcc dot gnu.org, law at gcc dot gnu.org,
                    marxin at gcc dot gnu.org, sayle at gcc dot gnu.org,
                    unassigned at gcc dot gnu.org, uros at gcc dot gnu.org,
                    vmakarov at gcc dot gnu.org
        Depends on: 107627
  Target Milestone: ---
            Target: x86_64-*-* i?86-*-*

+++ This bug was initially created as a clone of Bug #107627 +++

static inline unsigned long long
qux (unsigned int x, unsigned int y)
{
  return ((unsigned long long) x << 32) | y;
}

static inline unsigned int
corge (unsigned int x, unsigned int y, unsigned z)
{
  return qux (x, y) >> (z % 32);
}

void
garply (unsigned int *x, const unsigned int *y, unsigned z)
{
  x[0] = corge (y[0], y[1], z);
}

with -m32 -O2 -mno-sse on x86_64-linux regressed with
r11-6188-g0b76990a9d75d97b84014e37519086b81824c307
Previously:
        pushl   %ebx
        movl    12(%esp), %ebx
        movl    16(%esp), %ecx
        movl    (%ebx), %edx
        movl    4(%ebx), %eax
        shrdl   %edx, %eax
        movl    8(%esp), %edx
        movl    %eax, (%edx)
        popl    %ebx
        ret
After:
        pushl   %edi
        xorl    %edi, %edi
        pushl   %esi
        pushl   %ebx
        movl    20(%esp), %ebx
        movl    24(%esp), %ecx
        movl    4(%ebx), %esi
        movl    (%ebx), %edx
        movl    %esi, %eax
        orl     %edi, %edx
        shrdl   %edx, %eax
        movl    16(%esp), %edx
        movl    %eax, (%edx)
        popl    %ebx
        popl    %esi
        popl    %edi
        ret


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107627
[Bug 107627] [13 Regression] int128_t shift generates extra xor/or.

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

end of thread, other threads:[~2023-05-29 16:17 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-22 12:54 [Bug target/107812] New: [11/12/13 Regression] RTL SSA forwprop introduced regression jakub at gcc dot gnu.org
2022-11-22 12:54 ` [Bug target/107812] [11/12/13 Regression] RTL SSA forwprop introduced regression since r11-6188 jakub at gcc dot gnu.org
2022-11-22 14:29 ` rsandifo at gcc dot gnu.org
2022-12-01  8:36 ` jakub at gcc dot gnu.org
2023-05-29 10:07 ` [Bug target/107812] [11/12/13/14 " jakub at gcc dot gnu.org
2023-05-29 16:17 ` 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).