public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Philipp Tomsich <ptomsich@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org
Subject: [gcc r14-3801] riscv: bitmanip: Remove duplicate zero_extendhi<GPR:mode>2 pattern
Date: Fri,  8 Sep 2023 09:28:58 +0000 (GMT)	[thread overview]
Message-ID: <20230908092858.4C11A3858D35@sourceware.org> (raw)

https://gcc.gnu.org/g:0c37fef39fa0a8f77ea4fc67d1bbf5067d4bddb9

commit r14-3801-g0c37fef39fa0a8f77ea4fc67d1bbf5067d4bddb9
Author: Christoph Müllner <christoph.muellner@vrull.eu>
Date:   Fri Sep 8 08:19:32 2023 +0200

    riscv: bitmanip: Remove duplicate zero_extendhi<GPR:mode>2 pattern
    
    We currently have two identical zero_extendhi<GPR:mode>2 patterns:
    * '*zero_extendhi<GPR:mode>2_zbb'
    * '*zero_extendhi<GPR:mode>2_bitmanip'
    
    This patch removes the *_zbb pattern and ensures that all sign- and
    zero-extensions use the postfix '_bitmanip'.
    
    Signed-off-by: Christoph Müllner <christoph.muellner@vrull.eu>
    
    gcc/ChangeLog:
    
            * config/riscv/bitmanip.md (*extend<SHORT:mode><SUPERQI:mode>2_zbb):
            Rename postfix to _bitmanip.
            (*extend<SHORT:mode><SUPERQI:mode>2_bitmanip): Renamed pattern.
            (*zero_extendhi<GPR:mode>2_zbb): Remove duplicated pattern.

Diff:
---
 gcc/config/riscv/bitmanip.md | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/gcc/config/riscv/bitmanip.md b/gcc/config/riscv/bitmanip.md
index 1544ef4e1252..431b32922135 100644
--- a/gcc/config/riscv/bitmanip.md
+++ b/gcc/config/riscv/bitmanip.md
@@ -283,7 +283,7 @@
   [(set_attr "type" "bitmanip,load")
    (set_attr "mode" "<GPR:MODE>")])
 
-(define_insn "*extend<SHORT:mode><SUPERQI:mode>2_zbb"
+(define_insn "*extend<SHORT:mode><SUPERQI:mode>2_bitmanip"
   [(set (match_operand:SUPERQI   0 "register_operand"     "=r,r")
 	(sign_extend:SUPERQI
 	    (match_operand:SHORT 1 "nonimmediate_operand" " r,m")))]
@@ -294,17 +294,6 @@
   [(set_attr "type" "bitmanip,load")
    (set_attr "mode" "<SUPERQI:MODE>")])
 
-(define_insn "*zero_extendhi<GPR:mode>2_zbb"
-  [(set (match_operand:GPR    0 "register_operand"     "=r,r")
-	(zero_extend:GPR
-	    (match_operand:HI 1 "nonimmediate_operand" " r,m")))]
-  "TARGET_ZBB"
-  "@
-   zext.h\t%0,%1
-   lhu\t%0,%1"
-  [(set_attr "type" "bitmanip,load")
-   (set_attr "mode" "HI")])
-
 (define_expand "rotrdi3"
   [(set (match_operand:DI 0 "register_operand")
 	(rotatert:DI (match_operand:DI 1 "register_operand")

                 reply	other threads:[~2023-09-08  9:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20230908092858.4C11A3858D35@sourceware.org \
    --to=ptomsich@gcc.gnu.org \
    --cc=gcc-cvs@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).