public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/66489] combine fails to merge insns if some are reused later on
Date: Fri, 02 Jun 2023 04:53:08 +0000	[thread overview]
Message-ID: <bug-66489-4-yUukXU7Dye@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-66489-4@http.gcc.gnu.org/bugzilla/>

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

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

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Fixed in GCC 9 with 2->2 combing being done now (r9-2064-gc4c5ad1d6d1e1e1fe7a):

Trying 11 -> 12:
   11: r96:SI=-r115:SI
      REG_DEAD r115:SI
   12: r108:SI=r96:SI*r103:SI
Failed to match this instruction:
(parallel [
        (set (reg:SI 108)
            (mult:SI (neg:SI (reg:SI 115))
                (reg/v:SI 103 [ cD.4384 ])))
        (set (reg/v:SI 96 [ aD.4382 ])
            (neg:SI (reg:SI 115)))
    ])
Failed to match this instruction:
(parallel [
        (set (reg:SI 108)
            (mult:SI (neg:SI (reg:SI 115))
                (reg/v:SI 103 [ cD.4384 ])))
        (set (reg/v:SI 96 [ aD.4382 ])
            (neg:SI (reg:SI 115)))
    ])
Successfully matched this instruction:
(set (reg/v:SI 96 [ aD.4382 ])
    (neg:SI (reg:SI 115)))
Successfully matched this instruction:
(set (reg:SI 108)
    (mult:SI (neg:SI (reg:SI 115))
        (reg/v:SI 103 [ cD.4384 ])))
allowing combination of insns 11 and 12
original costs 4 + 12 = 16
replacement costs 4 + 12 = 16
modifying insn i2    11: r96:SI=-r115:SI
deferring rescan insn with uid = 11.
modifying insn i3    12: r108:SI=-r115:SI*r103:SI
      REG_DEAD r115:SI
deferring rescan insn with uid = 12.

      parent reply	other threads:[~2023-06-02  4:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-10 14:30 [Bug rtl-optimization/66489] New: " ktkachov at gcc dot gnu.org
2015-06-10 14:37 ` [Bug rtl-optimization/66489] " pinskia at gcc dot gnu.org
2015-06-10 14:41 ` ktkachov at gcc dot gnu.org
2015-06-10 14:54 ` pinskia at gcc dot gnu.org
2023-06-02  4:53 ` pinskia at gcc dot gnu.org [this message]

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-66489-4-yUukXU7Dye@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).