public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ubizjak at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/82261] x86: missing peephole for SHLD / SHRD
Date: Tue, 19 May 2020 10:45:56 +0000 [thread overview]
Message-ID: <bug-82261-4-o9ISc5aP61@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-82261-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82261
--- Comment #3 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Michael Clark from comment #2)
> Just refreshing this issue. I found it while testing some code-gen on
> Godbolt:
The combiner creates:
Failed to match this instruction:
(parallel [
(set (reg:SI 89)
(ior:SI (ashift:SI (reg:SI 94)
(subreg:QI (reg/v:SI 88 [ n ]) 0))
(lshiftrt:SI (reg:SI 95)
(minus:QI (subreg:QI (reg:SI 91) 0)
(subreg:QI (reg/v:SI 88 [ n ]) 0)))))
(clobber (reg:CC 17 flags))
])
This is *almost* matched by:
(define_insn "x86_shld"
[(set (match_operand:SI 0 "nonimmediate_operand" "+r*m")
(ior:SI (ashift:SI (match_dup 0)
(match_operand:QI 2 "nonmemory_operand" "Ic"))
(lshiftrt:SI (match_operand:SI 1 "register_operand" "r")
(minus:QI (const_int 32) (match_dup 2)))))
(clobber (reg:CC FLAGS_REG))]
but RTL combiner doesn't propagate (const_int 32) into the pattern.
I wonder if tree combiner can help here.
next prev parent reply other threads:[~2020-05-19 10:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-82261-4@http.gcc.gnu.org/bugzilla/>
2020-05-18 20:39 ` michaeljclark at mac dot com
2020-05-19 10:45 ` ubizjak at gmail dot com [this message]
2022-04-09 7:00 ` peter at cordes dot ca
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-82261-4-o9ISc5aP61@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).