[PATCH 04/15] s390: Fix non-robust split condition in define_insn_and_split

Kewen Lin linkw@linux.ibm.com
Thu Nov 11 11:24:48 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/s390/s390.md (*cstorecc<mode>_z13): Fix split condition.
	* config/s390/vector.md (fprx2_to_tf, tf_to_fprx2): Likewise.
---
 gcc/config/s390/s390.md   | 2 +-
 gcc/config/s390/vector.md | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index 4debdcd1247..1d66c30b9d5 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -6941,7 +6941,7 @@ (define_insn_and_split "*cstorecc<mode>_z13"
 			     (match_operand 3 "const_int_operand"  "")]))]
   "TARGET_Z13"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(set (match_dup 0) (const_int 0))
    (set (match_dup 0)
 	(if_then_else:GPR
diff --git a/gcc/config/s390/vector.md b/gcc/config/s390/vector.md
index 1ed1d0665d4..8aa4e82c28d 100644
--- a/gcc/config/s390/vector.md
+++ b/gcc/config/s390/vector.md
@@ -641,7 +641,7 @@ (define_insn_and_split "fprx2_to_tf"
   "@
    vmrhg\t%v0,%1,%N1
    #"
-  "!(MEM_P (operands[0]) && MEM_VOLATILE_P (operands[0]))"
+  "&& !(MEM_P (operands[0]) && MEM_VOLATILE_P (operands[0]))"
   [(set (match_dup 2) (match_dup 3))
    (set (match_dup 4) (match_dup 5))]
 {
@@ -916,7 +916,7 @@ (define_insn_and_split "tf_to_fprx2"
 	(subreg:FPRX2 (match_operand:TF 1 "general_operand"       "v,AR") 0))]
   "TARGET_VXE"
   "#"
-  "!(MEM_P (operands[1]) && MEM_VOLATILE_P (operands[1]))"
+  "&& !(MEM_P (operands[1]) && MEM_VOLATILE_P (operands[1]))"
   [(set (match_dup 2) (match_dup 3))
    (set (match_dup 4) (match_dup 5))]
 {
-- 
2.27.0



More information about the Gcc-patches mailing list