]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
LoongArch: Remove QHSD and use QHWD instead
authorXi Ruoyao <xry111@xry111.site>
Mon, 2 Dec 2024 06:48:24 +0000 (14:48 +0800)
committerXi Ruoyao <xry111@xry111.site>
Wed, 18 Dec 2024 08:43:33 +0000 (16:43 +0800)
QHSD and QHWD are basically the same thing, but QHSD will be incorrect
when we start to add LA32 support.  So it's just better to always use
QHWD.

gcc/ChangeLog:

* config/loongarch/loongarch.md (QHSD): Remove.
(loongarch_<crc>_w_<size>_w): Use QHSD instead of QHWD.
(loongarch_<crc>_w_<size>_w_extended): Likewise.

gcc/config/loongarch/loongarch.md

index a65cc1de2d2e268571d2191a17d67bd32263170b..bf322240271ce3333b491224e3dcd3dbd1bae4b6 100644 (file)
 
 
 
-(define_mode_iterator QHSD [QI HI SI DI])
 (define_int_iterator CRC [UNSPEC_CRC UNSPEC_CRCC])
 (define_int_attr crc [(UNSPEC_CRC "crc") (UNSPEC_CRCC "crcc")])
 
 (define_insn "loongarch_<crc>_w_<size>_w"
   [(set (match_operand:SI 0 "register_operand" "=r")
-       (unspec:SI [(match_operand:QHSD 1 "register_operand" "r")
+       (unspec:SI [(match_operand:QHWD 1 "register_operand" "r")
                   (match_operand:SI 2 "register_operand" "r")]
                     CRC))]
   ""
 (define_insn "loongarch_<crc>_w_<size>_w_extended"
   [(set (match_operand:DI 0 "register_operand" "=r")
        (sign_extend:DI
-         (unspec:SI [(match_operand:QHSD 1 "register_operand" "r")
+         (unspec:SI [(match_operand:QHWD 1 "register_operand" "r")
                      (match_operand:SI 2 "register_operand" "r")]
                     CRC)))]
   "TARGET_64BIT"