From d9c7d5f72f086e52db9148b87d7007fa4ef7d7f0 Mon Sep 17 00:00:00 2001
From: amylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 13 Aug 2004 15:24:30 +0000
Subject: [PATCH] 	* sh.md (cbranch define_delay) Use cond_delay_slot for
 	non-anulled condition too.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85941 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog       | 5 +++++
 gcc/config/sh/sh.md | 6 +++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 554930ace333..47c8fb2c053f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2004-08-13  J"orn Rennecke <joern.rennecke@superh.com>
+
+	* sh.md (cbranch define_delay) Use cond_delay_slot for
+	non-anulled condition too.
+
 2004-08-12  David Edelsohn  <edelsohn@gnu.org>
 
 	* config/rs6000/rs6000.c (any_parallel_operand): New predicate.
diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md
index 8b2c6f2bb96d..cb7de4004c89 100644
--- a/gcc/config/sh/sh.md
+++ b/gcc/config/sh/sh.md
@@ -524,12 +524,16 @@
 ;; Say that we have annulled true branches, since this gives smaller and
 ;; faster code when branches are predicted as not taken.
 
+;; ??? The non-annulled condition should really be "in_delay_slot",
+;; but insns that can be filled in non-annulled get priority over insns
+;; that can only be filled in anulled.
+
 (define_delay
   (and (eq_attr "type" "cbranch")
        (ne (symbol_ref "TARGET_SH2") (const_int 0)))
   ;; SH2e has a hardware bug that pretty much prohibits the use of
   ;; annuled delay slots.
-  [(eq_attr "in_delay_slot" "yes") (and (eq_attr "cond_delay_slot" "yes")
+  [(eq_attr "cond_delay_slot" "yes") (and (eq_attr "cond_delay_slot" "yes")
 					(not (eq_attr "cpu" "sh2e"))) (nil)])
 
 ;; -------------------------------------------------------------------------
-- 
GitLab