diff mbox series

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

Message ID 9dc4a97a785e0f7e3bda0540ffd3b95edf29ce09.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/sh/sh.md (call_pcrel, call_value_pcrel, sibcall_pcrel,
	sibcall_value_pcrel): Fix split condition.
---
 gcc/config/sh/sh.md | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 93ee7c9a7de..1bb325c7044 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -6566,7 +6566,7 @@  (define_insn_and_split "call_pcrel"
    (clobber (match_scratch:SI 2 "=&r"))]
   "TARGET_SH2"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(const_int 0)]
 {
   rtx lab = PATTERN (gen_call_site ());
@@ -6678,7 +6678,7 @@  (define_insn_and_split "call_value_pcrel"
    (clobber (match_scratch:SI 3 "=&r"))]
   "TARGET_SH2"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(const_int 0)]
 {
   rtx lab = PATTERN (gen_call_site ());
@@ -6877,7 +6877,7 @@  (define_insn_and_split "sibcall_pcrel"
    (return)]
   "TARGET_SH2 && !TARGET_FDPIC"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(const_int 0)]
 {
   rtx lab = PATTERN (gen_call_site ());
@@ -7043,7 +7043,7 @@  (define_insn_and_split "sibcall_value_pcrel"
    (return)]
   "TARGET_SH2 && !TARGET_FDPIC"
   "#"
-  "reload_completed"
+  "&& reload_completed"
   [(const_int 0)]
 {
   rtx lab = PATTERN (gen_call_site ());