This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 003/236] config/mn10300: Fix missing PATTERN in PARALLEL handling
- From: Richard Henderson <rth at redhat dot com>
- To: David Malcolm <dmalcolm at redhat dot com>, gcc-patches at gcc dot gnu dot org
- Date: Tue, 19 Aug 2014 11:02:21 -0700
- Subject: Re: [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> <1407345815-14551-4-git-send-email-dmalcolm at redhat dot com>
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~