public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/107812] New: [11/12/13 Regression] RTL SSA forwprop introduced regression
Date: Tue, 22 Nov 2022 12:54:07 +0000	[thread overview]
Message-ID: <bug-107812-4@http.gcc.gnu.org/bugzilla/> (raw)

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.

             reply	other threads:[~2022-11-22 12:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-22 12:54 jakub at gcc dot gnu.org [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-107812-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).