public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: qiaopeixin <qiaopeixin@huawei.com>
To: Richard Sandiford <richard.sandiford@arm.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: RE: [PATCH] AArch64: Add if condition in aarch64_function_value [PR96479]
Date: Thu, 13 Aug 2020 01:54:27 +0000	[thread overview]
Message-ID: <42246858DDD89D4E9F3F8317B1282F59A34DD9@dggemi522-mbs.china.huawei.com> (raw)
In-Reply-To: <mpt7du3sufr.fsf@arm.com>

Thanks for the review and commit.

All the best,
Peixin

-----Original Message-----
From: Richard Sandiford [mailto:richard.sandiford@arm.com] 
Sent: 2020年8月13日 0:25
To: qiaopeixin <qiaopeixin@huawei.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] AArch64: Add if condition in aarch64_function_value [PR96479]

qiaopeixin <qiaopeixin@huawei.com> writes:
> Hi,
>
> The test case vector-subscript-2.c in the gcc testsuit will report an ICE in the expand pass since '-mgeneral-regs-only' is incompatible with the use of V4SI mode. I propose to report the diagnostic information instead of ICE, and the problem has been discussed on PR 96479.
>
> I attached the patch to solve the problem. Bootstrapped and tested on aarch64-linux-gnu. Any suggestions?

Thanks, pushed.  I was initially sceptical because raising an error here and in aarch64_layout_arg is a hack.  Both functions are just query functions and shouldn't have any side effects.

The approach we took for FP modes seemed better: we define the FP move patterns unconditionally, and raise an error if we try to emit an FP move with !TARGET_FLOAT.  This defers any error reporting until we actually try to generate code that depends on TARGET_FLOAT.

But I guess SIMD stuff is different.  There's no reason in principle why you can't use:

  unsigned short __attribute__((vector_size(8)))

*within* a function with -mgeneral-regs-only.  It would just need to be emulated, in the same way as for:

  unsigned short __attribute__((vector_size(4)))

So it would be wrong to define the SIMD move patterns unconditionally and raise an error there.

So all in all, I agree this is the best we can do given the current infrastructure.

Thanks,
Richard


  reply	other threads:[~2020-08-13  1:54 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-06 13:01 qiaopeixin
2020-08-12 16:25 ` Richard Sandiford
2020-08-13  1:54   ` qiaopeixin [this message]
2020-08-13 11:43     ` Christophe Lyon
2020-08-13 12:18       ` Richard Sandiford
2020-08-18  3:37 qiaopeixin
2020-08-18 12:18 ` Christophe Lyon
2020-08-18 17:00 ` Richard Sandiford
2020-08-19  9:33   ` qiaopeixin
2020-08-19  9:55     ` Richard Sandiford
2020-08-19 10:41       ` qiaopeixin

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=42246858DDD89D4E9F3F8317B1282F59A34DD9@dggemi522-mbs.china.huawei.com \
    --to=qiaopeixin@huawei.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.sandiford@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).