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/106585] RISC-V: Mis-optimized code gen for zbs
Date: Thu, 11 Aug 2022 15:52:51 +0000	[thread overview]
Message-ID: <bug-106585-4-8KKNYFSTjR@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-106585-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
One issue is RV32i_zbb produces:
(insn 8 4 9 2 (set (reg:SI 78)
        (ashift:SI (const_int 1 [0x1])
            (subreg:QI (reg/v:SI 76 [ rs2 ]) 0))) "t6.c":3:20 323 {*bsetsi_1}
     (expr_list:REG_DEAD (reg/v:SI 76 [ rs2 ])
        (nil)))


While RV64i_zbb does not match:
(insn 7 4 8 2 (set (reg:SI 79)
        (const_int 1 [0x1])) "t6.c":3:20 140 {*movsi_internal}
     (nil))
(insn 8 7 9 2 (set (reg:SI 78)
        (ashift:SI (reg:SI 79)
            (subreg:QI (reg/v:DI 76 [ rs2 ]) 0))) "t6.c":3:20 154 {ashlsi3}
     (expr_list:REG_DEAD (reg:SI 79)
        (expr_list:REG_DEAD (reg/v:DI 76 [ rs2 ])
            (expr_list:REG_EQUAL (ashift:SI (const_int 1 [0x1])
                    (subreg:QI (reg/v:DI 76 [ rs2 ]) 0))
                (nil)))))

  parent reply	other threads:[~2022-08-11 15:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-11 15:36 [Bug target/106585] New: " kito at gcc dot gnu.org
2022-08-11 15:45 ` [Bug target/106585] " pinskia at gcc dot gnu.org
2022-08-11 15:46 ` pinskia at gcc dot gnu.org
2022-08-11 15:52 ` pinskia at gcc dot gnu.org [this message]
2022-08-11 15:54 ` pinskia at gcc dot gnu.org
2022-08-11 16:10 ` kito at gcc dot gnu.org
2022-08-11 16:23 ` kito at gcc dot gnu.org
2022-08-11 16:27 ` pinskia at gcc dot gnu.org
2022-12-07 22:45 ` law at gcc dot gnu.org
2022-12-08  5:02 ` palmer at gcc dot gnu.org
2022-12-08  6:25   ` Andrew Waterman
2022-12-08  6:25 ` andrew at sifive dot com
2022-12-08 16:16 ` palmer at gcc dot gnu.org
2023-04-28 22:46 ` law 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-106585-4-8KKNYFSTjR@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).