This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH 003/236] config/mn10300: Fix missing PATTERN in PARALLEL handling
- From: David Malcolm <dmalcolm at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Cc: David Malcolm <dmalcolm at redhat dot com>
- Date: Wed, 6 Aug 2014 13:19:42 -0400
- Subject: [PATCH 003/236] config/mn10300: Fix missing PATTERN in PARALLEL handling
- Authentication-results: sourceware.org; auth=none
- References: <1407345815-14551-1-git-send-email-dmalcolm at redhat dot com>
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