public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "crazylht at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug target/89954] missed optimization for signed extension for x86-64
Date: Thu, 23 Sep 2021 05:06:04 +0000 [thread overview]
Message-ID: <bug-89954-4-tvBCTfjLgB@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-89954-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89954
--- Comment #8 from Hongtao.liu <crazylht at gmail dot com> ---
(In reply to Uroš Bizjak from comment #7)
> Created attachment 51496 [details]
> Prototype patch
+;; convert (sign_extend:WIDE (any_logic:NARROW (memory, immediate)))
+;; to (any_logic:WIDE (sign_extend (memory)), (sign_extend (immediate))).
+;; This eliminates sign extension after logic operation.
+
+(define_split
+ [(set (match_operand:SWI248 0 "register_operand")
+ (sign_extend:SWI248
+ (any_logic:QI (match_operand:QI 1 "memory_operand")
+ (match_operand:QI 2 "const_int_operand"))))]
+ ""
+ [(set (match_dup 0) (any_logic:SWI248 (match_dup 0) (match_dup 2)))]
+ "convert_move (operands[0], operands[1], false);")
Shouldn't we make sure (any_logic op1 const_int) would change sign bit of op1?
next prev parent reply other threads:[~2021-09-23 5:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bug-89954-4@http.gcc.gnu.org/bugzilla/>
2021-09-05 7:01 ` pinskia at gcc dot gnu.org
2021-09-09 5:13 ` crazylht at gmail dot com
2021-09-11 12:59 ` ubizjak at gmail dot com
2021-09-11 14:24 ` crazylht at gmail dot com
2021-09-22 19:04 ` ubizjak at gmail dot com
2021-09-23 5:06 ` crazylht at gmail dot com [this message]
2021-09-23 5:17 ` crazylht at gmail dot com
2021-09-30 8:00 ` ubizjak at gmail dot com
2021-09-30 17:35 ` cvs-commit at gcc dot gnu.org
2021-09-30 17:38 ` ubizjak at gmail dot com
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-89954-4-tvBCTfjLgB@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).