]> gcc.gnu.org Git - gcc.git/commitdiff
RISC-V: Use reg_or_subregno to check regno [PR109092]
authorJu-Zhe Zhong <juzhe.zhong@rivai.ai>
Mon, 13 Mar 2023 14:17:57 +0000 (22:17 +0800)
committerKito Cheng <kito.cheng@sifive.com>
Fri, 17 Mar 2023 09:48:58 +0000 (17:48 +0800)
gcc/ChangeLog:

PR target/109092
* config/riscv/riscv.md: Fix subreg bug.

gcc/config/riscv/riscv.md

index 863400cd447a2623128fa69972e5b70dd552dc2c..bc384d9aedf12a755c95197c8f07d60987580257 100644 (file)
        (zero_extend:DI
            (match_operand:SI 1 "nonimmediate_operand" " r,m")))]
   "TARGET_64BIT && !TARGET_ZBA
-   && !(REG_P (operands[1])
-        && REGNO (operands[1]) == VL_REGNUM)"
+   && !(register_operand (operands[1], SImode)
+        && reg_or_subregno (operands[1]) == VL_REGNUM)"
   "@
    #
    lwu\t%0,%1"
   "(register_operand (operands[0], SImode)
     || reg_or_0_operand (operands[1], SImode))
     && !(register_operand (operands[1], SImode)
-         && REGNO (operands[1]) == VL_REGNUM)"
+         && reg_or_subregno (operands[1]) == VL_REGNUM)"
   { return riscv_output_move (operands[0], operands[1]); }
   [(set_attr "move_type" "move,const,load,store,mtc,fpload,mfc,fpstore,rdvlenb")
    (set_attr "mode" "SI")
This page took 0.071736 seconds and 5 git commands to generate.