public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Marcus Shawcroft <marcus.shawcroft@gmail.com>
To: Kyrill Tkachov <kyrylo.tkachov@arm.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	Marcus Shawcroft <marcus.shawcroft@arm.com>,
		Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>,
	Richard Earnshaw <Richard.Earnshaw@arm.com>,
		James Greenhalgh <james.greenhalgh@arm.com>
Subject: Re: [PATCH][ARM/AArch64] PR 68088: Fix RTL checking ICE due to subregs inside accumulator forwarding check
Date: Thu, 29 Oct 2015 13:50:00 -0000	[thread overview]
Message-ID: <CAFqB+PygDCD+0oZB2E_7aVyJ0Spnc1k_PqkBFcwUua3zwMBreA@mail.gmail.com> (raw)
In-Reply-To: <56309E44.8070100@arm.com>

On 28 October 2015 at 10:07, Kyrill Tkachov <kyrylo.tkachov@arm.com> wrote:
> Hi all,
>
> This RTL checking error occurs on aarch64 in aarch_accumulator_forwarding
> when processing an msubsi insn
> with subregs:
> (insn 15 14 16 3 (set (reg/v:SI 78 [ i ])
>         (minus:SI (subreg:SI (reg/v:DI 76 [ aul ]) 0)
>             (mult:SI (subreg:SI (reg:DI 83) 0)
>                 (subreg:SI (reg:DI 75 [ _20 ]) 0)))) schedice.c:10 357
> {*msubsi}
>
> The register_operand predicate for that pattern allows subregs (I think
> correctly).
> The code in aarch_accumulator_forwarding doesn't take that into account and
> ends up
> taking a REGNO of a SUBREG, causing a checking error.
>
> This patch fixes that by stripping the subregs off the accumulator rtx
> before
> checking that the inner expression is a REG and taking its REGNO.
>
> The testcase now works fine with an aarch64-none-elf toolchain configure for
> RTL checking.
>
> The testcase is taken verbatim from the BZ entry for PR 68088.
> Since this function is shared between arm and aarch64 I've bootstrapped and
> tested it on both
> and I'll need ok's for both ports.
>
> Ok for trunk?

rtl.h exposes reg_or_subregno() already doesn't that do what we need here?

The test case is not aarch64 specific therefore I think convention is
that it should go into a generic directory.

Cheers
/Marcus

  reply	other threads:[~2015-10-29 13:46 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-28 10:08 Kyrill Tkachov
2015-10-29 13:50 ` Marcus Shawcroft [this message]
2015-10-29 14:00   ` Kyrill Tkachov
2015-10-29 14:02     ` Marcus Shawcroft
2015-10-29 14:18       ` Kyrill Tkachov
2015-11-06 11:39         ` Kyrill Tkachov
2015-11-06 11:50         ` Ramana Radhakrishnan
2015-11-06 12:26 ` Nikolai Bozhenov
2015-11-06 13:46   ` Ramana Radhakrishnan
2015-11-06 17:08     ` Nikolai Bozhenov
2015-11-06 17:09       ` Kyrill Tkachov
2015-11-06 17:16         ` Kyrill Tkachov
2015-11-09  8:14           ` Nikolai Bozhenov
2015-11-09  9:22             ` Kyrill Tkachov
2015-11-06 17:32         ` Nikolai Bozhenov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFqB+PygDCD+0oZB2E_7aVyJ0Spnc1k_PqkBFcwUua3zwMBreA@mail.gmail.com \
    --to=marcus.shawcroft@gmail.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=james.greenhalgh@arm.com \
    --cc=kyrylo.tkachov@arm.com \
    --cc=marcus.shawcroft@arm.com \
    --cc=ramana.radhakrishnan@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).