public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>
To: Andre Simoes Dias Vieira <Andre.SimoesDiasVieira@arm.com>,
	"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: Christophe Lyon <christophe.lyon@linaro.org>
Subject: RE: [arm] Fix MVE addressing modes for VLDR[BHW] and VSTR[BHW]
Date: Wed, 13 Oct 2021 12:37:22 +0000	[thread overview]
Message-ID: <PAXPR08MB6926638F4F220606090BD25C93B79@PAXPR08MB6926.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <9a52d3ba-ca2d-03b9-c709-a50909057887@arm.com>

Hi Andre,

> -----Original Message-----
> From: Andre Vieira (lists) <andre.simoesdiasvieira@arm.com>
> Sent: Tuesday, October 12, 2021 5:42 PM
> To: gcc-patches@gcc.gnu.org
> Cc: Kyrylo Tkachov <Kyrylo.Tkachov@arm.com>; Christophe Lyon
> <christophe.lyon@linaro.org>
> Subject: [arm] Fix MVE addressing modes for VLDR[BHW] and VSTR[BHW]
> 
> Hi,
> 
> The way we were previously dealing with addressing modes for MVE was
> preventing
> the use of pre, post and offset addressing modes for the normal loads and
> stores, including widening and narrowing.  This patch fixes that and
> adds tests to ensure we are capable of using all the available addressing
> modes.
> 
> gcc/ChangeLog:
> 2021-10-12  Andre Vieira  <andre.simoesdiasvieira@arm.com>
> 
>          * config/arm/arm.c (thumb2_legitimate_address_p): Use
> VALID_MVE_MODE
>      when checking mve addressing modes.
>          (mve_vector_mem_operand): Fix the way we handle pre, post and
> offset
>      addressing modes.
>          (arm_print_operand): Fix printing of POST_ and PRE_MODIFY.

@@ -24276,7 +24271,7 @@ arm_print_operand (FILE *stream, rtx x, int code)
 	else if (code == POST_MODIFY || code == PRE_MODIFY)
 	  {
 	    asm_fprintf (stream, "[%r", REGNO (XEXP (addr, 0)));
-	    postinc_reg = XEXP ( XEXP (x, 1), 1);
+	    postinc_reg = XEXP (XEXP (addr, 1), 1);
 	    if (postinc_reg && CONST_INT_P (postinc_reg))
 	      {
 		if (code == POST_MODIFY)

this looks like a bug fix that should be separately backported to the branches?
Otherwise, the patch looks ok for trunk to me.
Thanks,
Kyrill


>          * config/arm/mve.md: Use mve_memory_operand predicate
> everywhere where
>      there is a single Ux constraint.
> 
> gcc/testsuite/ChangeLog:
> 2021-10-12  Andre Vieira  <andre.simoesdiasvieira@arm.com>
> 
>          * gcc.target/arm/mve/mve.exp: Make it test main directory.
>          * gcc.target/arm/mve/mve_load_memory_modes.c: New test.
>          * gcc.target/arm/mve/mve_store_memory_modes.c: New test.

  reply	other threads:[~2021-10-13 12:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-12 16:42 Andre Vieira (lists)
2021-10-13 12:37 ` Kyrylo Tkachov [this message]
2021-10-13 13:08   ` Andre Vieira (lists)
2021-10-13 15:47     ` Kyrylo Tkachov

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=PAXPR08MB6926638F4F220606090BD25C93B79@PAXPR08MB6926.eurprd08.prod.outlook.com \
    --to=kyrylo.tkachov@arm.com \
    --cc=Andre.SimoesDiasVieira@arm.com \
    --cc=christophe.lyon@linaro.org \
    --cc=gcc-patches@gcc.gnu.org \
    /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).