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 target/106277] missed-optimization: redundant movzx
Date: Wed, 13 Jul 2022 15:49:52 +0000	[thread overview]
Message-ID: <bug-106277-4-WtBwToR7O3@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106277-4@http.gcc.gnu.org/bugzilla/>

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2022-07-13
     Ever confirmed|0                           |1

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Because the RTL does not describe the load is zero-extended to SI:
(insn 9 8 10 2 (set (reg:QI 91 [ *b_6(D) ])
        (mem:QI (reg:DI 93) [0 *b_6(D)+0 S1 A8])) "/app/example.cpp":4:31 85
{*movqi_internal}
     (expr_list:REG_DEAD (reg:DI 93)
        (nil)))
(insn 10 9 11 2 (parallel [
            (set (reg:QI 89)
                (plus:QI (mem:QI (reg:DI 92) [0 *a_5(D)+0 S1 A8])
                    (reg:QI 91 [ *b_6(D) ])))
            (clobber (reg:CC 17 flags))
        ]) "/app/example.cpp":4:31 235 {*addqi_1}
     (expr_list:REG_DEAD (reg:DI 92)
        (expr_list:REG_UNUSED (reg:CC 17 flags)
            (expr_list:REG_DEAD (reg:QI 91 [ *b_6(D) ])
                (nil)))))
(insn 11 10 16 2 (set (reg:SI 88)
        (zero_extend:SI (reg:QI 89))) "/app/example.cpp":4:35 152
{*zero_extendqisi2}
     (expr_list:REG_DEAD (reg:QI 89)
        (nil)))

That is why.

  reply	other threads:[~2022-07-13 15:49 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-13  2:16 [Bug middle-end/106277] New: " jl1184 at duke dot edu
2022-07-13 15:49 ` pinskia at gcc dot gnu.org [this message]
2022-07-13 16:06 ` [Bug target/106277] " amonakov at gcc dot gnu.org

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-106277-4-WtBwToR7O3@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).