diff mbox series

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

Message ID 0aee25d3397c9af8fc731648b25a18cbf4aa1ff8.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/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 mbox series

Patch

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)))