From: Jiajie Chen <[email protected]>

loongarch_move_integer does not support splitting 64-bit integer into
two 32-bit ones. Thus, define_split is removed from movdi_32bit.

gcc/ChangeLog:

        * config/loongarch/loongarch.md (movdi_32bit): Remove not
        working split, use existing loongarch_split_move instead.
---
 gcc/config/loongarch/loongarch.md | 13 ++-----------
 1 file changed, 2 insertions(+), 11 deletions(-)

diff --git a/gcc/config/loongarch/loongarch.md 
b/gcc/config/loongarch/loongarch.md
index 8d8856fb106..ad8f2a51d12 100644
--- a/gcc/config/loongarch/loongarch.md
+++ b/gcc/config/loongarch/loongarch.md
@@ -2205,22 +2205,13 @@ (define_expand "movdi"
     DONE;
 })
 
-(define_insn_and_split "*movdi_32bit"
+(define_insn "*movdi_32bit"
   [(set (match_operand:DI 0 "nonimmediate_operand" "=r,r,r,w,*f,*f,*r,*m")
        (match_operand:DI 1 "move_operand" "r,i,w,r,*J*r,*m,*f,*f"))]
   "!TARGET_64BIT
    && (register_operand (operands[0], DImode)
        || reg_or_0_operand (operands[1], DImode))"
   { return loongarch_output_move (operands); }
-  "CONST_INT_P (operands[1]) && REG_P (operands[0]) && GP_REG_P (REGNO
-  (operands[0]))"
-  [(const_int 0)]
-  "
-{
-  loongarch_move_integer (operands[0], operands[0], INTVAL (operands[1]));
-  DONE;
-}
-  "
   [(set_attr "move_type" "move,const,load,store,mgtf,fpload,mftg,fpstore")
    (set_attr "mode" "DI")])
 
@@ -2246,7 +2237,7 @@ (define_insn_and_split "*movdi_64bit"
   {
     return loongarch_output_move (operands);
   }
-  "CONST_INT_P (operands[1]) && REG_P (operands[0])
+  "&& CONST_INT_P (operands[1]) && REG_P (operands[0])
    && GP_REG_P (REGNO (operands[0]))"
   [(const_int 0)]
   "
-- 
2.34.1

Reply via email to