Message ID | 1407345815-14551-4-git-send-email-dmalcolm@redhat.com |
---|---|
State | New |
Headers | show |
On 08/06/14 11:19, David Malcolm wrote: > 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. Approved. Should go forward independently. Jeff
On 08/06/2014 10:19 AM, David Malcolm wrote: > @@ -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); I think these tests are simply wrong and should be removed. Certainly one can't expect to extract the first element of an insn's pattern and then a few lines later test the pattern vs JUMP_P. r~
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. */