diff mbox series

[11/15] csky: Fix non-robust split condition in define_insn_and_split

Message ID 11a7f2d5b98c5dadd6401acf196b02440439b63f.1636621345.git.linkw@linux.ibm.com
State New
Headers show
Series Fix non-robust split condition in define_insn_and_split | expand

Commit Message

Kewen.Lin Nov. 11, 2021, 11:24 a.m. UTC
This patch is to fix some non-robust split conditions in some
define_insn_and_splits, to make each of them applied on top of
the corresponding condition for define_insn part, otherwise the
splitting could perform unexpectedly.

gcc/ChangeLog:

	* config/csky/csky.md (*cskyv2_adddi3, *ck801_adddi3, *cskyv2_adddi1_1,
	*cskyv2_subdi3, *ck801_subdi3, *cskyv2_subdi1_1, cskyv2_addcc,
	cskyv2_addcc_invert, *cskyv2_anddi3, *ck801_anddi3, *cskyv2_iordi3,
	*ck801_iordi3, *cskyv2_xordi3, *ck801_xordi3,): Fix split condition.
---
 gcc/config/csky/csky.md | 28 ++++++++++++++--------------
 1 file changed, 14 insertions(+), 14 deletions(-)
diff mbox series

Patch

diff --git a/gcc/config/csky/csky.md b/gcc/config/csky/csky.md
index f91d851cb2c..54143a0efea 100644
--- a/gcc/config/csky/csky.md
+++ b/gcc/config/csky/csky.md
@@ -850,7 +850,7 @@  (define_insn_and_split "*cskyv2_adddi3"
    (clobber (reg:CC CSKY_CC_REGNUM))]
   "CSKY_ISA_FEATURE (E2)"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(const_int 0)]
   {
     int hi = TARGET_BIG_ENDIAN ? 0 : UNITS_PER_WORD;
@@ -877,7 +877,7 @@  (define_insn_and_split "*ck801_adddi3"
    (clobber (reg:CC CSKY_CC_REGNUM))]
   "CSKY_ISA_FEATURE (E1)"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(const_int 0)]
   {
     int hi = TARGET_BIG_ENDIAN ? 0 : UNITS_PER_WORD;
@@ -906,7 +906,7 @@  (define_insn_and_split "*cskyv2_adddi1_1"
    (clobber (reg:CC CSKY_CC_REGNUM))]
   "CSKY_ISA_FEATURE (E2)"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(const_int 0)]
   {
     int hi = TARGET_BIG_ENDIAN ? 0 : UNITS_PER_WORD;
@@ -1048,7 +1048,7 @@  (define_insn_and_split "*cskyv2_subdi3"
    (clobber (reg:CC CSKY_CC_REGNUM))]
   "CSKY_ISA_FEATURE (E2)"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(const_int 0)]
   {
     int hi = TARGET_BIG_ENDIAN ? 0 : UNITS_PER_WORD;
@@ -1075,7 +1075,7 @@  (define_insn_and_split "*ck801_subdi3"
    (clobber (reg:CC CSKY_CC_REGNUM))]
   "CSKY_ISA_FEATURE (E1)"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(const_int 0)]
   {
     int hi = TARGET_BIG_ENDIAN ? 0 : UNITS_PER_WORD;
@@ -1104,7 +1104,7 @@  (define_insn_and_split "*cskyv2_subdi1_1"
    (clobber (reg:CC CSKY_CC_REGNUM))]
   "CSKY_ISA_FEATURE (E2)"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(const_int 0)]
   {
     int hi = TARGET_BIG_ENDIAN ? 0 : UNITS_PER_WORD;
@@ -1276,7 +1276,7 @@  (define_insn_and_split "cskyv2_addcc"
    dect\t%0, %1, %M2
    #
    #"
-  "reload_completed && !rtx_equal_p (operands[0], operands[1])"
+  "&& reload_completed && !rtx_equal_p (operands[0], operands[1])"
   [(set (match_dup 0)
 	(if_then_else:SI (ne (reg:CC CSKY_CC_REGNUM) (const_int 0))
 			 (plus:SI (match_dup 0) (match_dup 2))))]
@@ -1302,7 +1302,7 @@  (define_insn_and_split "cskyv2_addcc_invert"
    decf\t%0, %1, %M2
    #
    #"
-  "reload_completed && !rtx_equal_p (operands[0], operands[1])"
+  "&& reload_completed && !rtx_equal_p (operands[0], operands[1])"
   [(set (match_dup 0)
 	(if_then_else:SI (eq (reg:CC CSKY_CC_REGNUM) (const_int 0))
 			 (plus:SI (match_dup 0) (match_dup 2))))]
@@ -1691,7 +1691,7 @@  (define_insn_and_split "*cskyv2_anddi3"
 		(match_operand:DI 2 "register_operand" "b,r")))]
   "CSKY_ISA_FEATURE (E2)"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(const_int 0)]
   {
     int hi = TARGET_BIG_ENDIAN ? 0 : UNITS_PER_WORD;
@@ -1716,7 +1716,7 @@  (define_insn_and_split "*ck801_anddi3"
 	       (match_operand:DI 2 "register_operand" "r")))]
   "CSKY_ISA_FEATURE (E1)"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(const_int 0)]
   {
     int hi = TARGET_BIG_ENDIAN ? 0 : UNITS_PER_WORD;
@@ -1801,7 +1801,7 @@  (define_insn_and_split "*cskyv2_iordi3"
 		(match_operand:DI 2 "register_operand" "b,  r")))]
   "CSKY_ISA_FEATURE (E2)"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(const_int 0)]
   {
     int hi = TARGET_BIG_ENDIAN ? 0 : UNITS_PER_WORD;
@@ -1826,7 +1826,7 @@  (define_insn_and_split "*ck801_iordi3"
 		(match_operand:DI 2 "register_operand" "r")))]
   "CSKY_ISA_FEATURE (E1)"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(const_int 0)]
   {
     int hi = TARGET_BIG_ENDIAN ? 0 : UNITS_PER_WORD;
@@ -1911,7 +1911,7 @@  (define_insn_and_split "*cskyv2_xordi3"
 		(match_operand:DI 2 "register_operand" "b,  r")))]
   "CSKY_ISA_FEATURE (E2)"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(const_int 0)]
   {
     int hi = TARGET_BIG_ENDIAN ? 0 : UNITS_PER_WORD;
@@ -1936,7 +1936,7 @@  (define_insn_and_split "*ck801_xordi3"
 		(match_operand:DI 2 "register_operand" "r")))]
   "CSKY_ISA_FEATURE (E1)"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(const_int 0)]
   {
     int hi = TARGET_BIG_ENDIAN ? 0 : UNITS_PER_WORD;