This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 003/236] config/mn10300: Fix missing PATTERN in PARALLEL handling


gcc/
	* config/mn10300/mn10300.c (mn10300_adjust_sched_cost): Fix the
	handling of PARALLEL to work on PATTERN (insn) and PATTERN (dep),
	rather than just on insn, dep themselves.  The latter are insns,
	and thus can't be PARALLEL.
---
 gcc/config/mn10300/mn10300.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c
index eb00077..99b5d19 100644
--- a/gcc/config/mn10300/mn10300.c
+++ b/gcc/config/mn10300/mn10300.c
@@ -2772,11 +2772,11 @@ mn10300_adjust_sched_cost (rtx insn, rtx link, rtx dep, int cost)
   if (!TARGET_AM33)
     return 1;
 
-  if (GET_CODE (insn) == PARALLEL)
-    insn = XVECEXP (insn, 0, 0);
+  if (GET_CODE (PATTERN (insn)) == PARALLEL)
+    insn = XVECEXP (PATTERN (insn), 0, 0);
 
-  if (GET_CODE (dep) == PARALLEL)
-    dep = XVECEXP (dep, 0, 0);
+  if (GET_CODE (PATTERN (dep)) == PARALLEL)
+    dep = XVECEXP (PATTERN (dep), 0, 0);
 
   /* For the AM34 a load instruction that follows a
      store instruction incurs an extra cycle of delay.  */
-- 
1.8.5.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]