[PATCH 02/15] m32c: Fix non-robust split condition in define_insn_and_split

Kewen Lin linkw@linux.ibm.com
Thu Nov 11 11:24:46 GMT 2021


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/m32c/cond.md (stzx_reversed_<mode>, movhicc_<code>_<mode>):
	Fix split condition.
---
 gcc/config/m32c/cond.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gcc/config/m32c/cond.md b/gcc/config/m32c/cond.md
index b80b10320fb..ce6493fc9f6 100644
--- a/gcc/config/m32c/cond.md
+++ b/gcc/config/m32c/cond.md
@@ -106,7 +106,7 @@ (define_insn_and_split "stzx_reversed_<mode>"
 			 (match_operand:QHI 2 "const_int_operand" "")))]
   "(TARGET_A24 || GET_MODE (operands[0]) == QImode) && reload_completed"
   "#"
-  ""
+  "&& 1"
   [(set (match_dup 0)
 	(if_then_else:QHI (eq (reg:CC FLG_REGNO) (const_int 0))
 		      (match_dup 2)
@@ -230,7 +230,7 @@ (define_insn_and_split "movhicc_<code>_<mode>"
 			  (match_operand:HI 4 "const_int_operand" "")))]
   "TARGET_A24"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(set (reg:CC FLG_REGNO)
 	(compare (match_dup 1)
 		 (match_dup 2)))
-- 
2.27.0



More information about the Gcc-patches mailing list