public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "liuhongt at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/113744] Unnecessary "m" constraint in *adddi_4
Date: Sun, 04 Feb 2024 03:06:02 +0000	[thread overview]
Message-ID: <bug-113744-4-sy5Qy4s6V7@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-113744-4@http.gcc.gnu.org/bugzilla/>

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

Hongtao Liu <liuhongt at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |liuhongt at gcc dot gnu.org

--- Comment #2 from Hongtao Liu <liuhongt at gcc dot gnu.org> ---
 7018; For comparisons against 1, -1 and 128, we may generate better code
 7019; by converting cmp to add, inc or dec as done by peephole2.  This pattern
 7020; is matched then.  We can't accept general immediate, because for
 7021; case of overflows,  the result is messed up.
 7022; Also carry flag is reversed compared to cmp, so this conversion is valid
 7023; only for comparisons not depending on it.
 7024

It sounds to me those peephole2 can be extended to memory operand since APX_NDD
supports that. So it's not redudant m constraint in the pattern, but miss
optimization in those peepholes.

      parent reply	other threads:[~2024-02-04  3:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-03 14:58 [Bug target/113744] New: " hjl.tools at gmail dot com
2024-02-03 15:00 ` [Bug target/113744] " hjl.tools at gmail dot com
2024-02-04  3:06 ` liuhongt 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-113744-4-sy5Qy4s6V7@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).