public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Kyrill Tkachov <kyrylo.tkachov@arm.com>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Cc: Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>,
	 Richard Earnshaw <Richard.Earnshaw@arm.com>
Subject: Re: [PATCH][ARM] PR 68143 Properly update memory offsets when expanding setmem
Date: Fri, 13 Nov 2015 11:52:00 -0000	[thread overview]
Message-ID: <5645CED9.8060400@arm.com> (raw)
In-Reply-To: <563C84ED.4010603@arm.com>

Ping.
https://gcc.gnu.org/ml/gcc-patches/2015-11/msg00581.html

Thanks,
Kyrill
On 06/11/15 10:46, Kyrill Tkachov wrote:
> Hi all,
>
> In this wrong-code PR the vector setmem expansion and arm_block_set_aligned_vect in particular
> use the wrong offset when calling adjust_automodify_address. In the attached testcase during the
> initial zeroing out we get two V16QI stores, but they both are recorded by adjust_automodify_address
> as modifying x+0 rather than x+0 and x+12 (the total size to be written is 28).
>
> This led to the scheduling pass moving the store from "x.g = 2;" to before the zeroing stores.
>
> This patch fixes the problem by keeping track of the offset to which stores are emitted and
> passing it to adjust_automodify_address as appropriate.
>
> From inspection I see arm_block_set_unaligned_vect also has this issue so I performed the same
> fix in that function as well.
>
> Bootstrapped and tested on arm-none-linux-gnueabihf.
>
> Ok for trunk?
>
> This bug appears on GCC 5 too and I'm currently testing this patch there.
> Ok to backport to GCC 5 as well?
>
> Thanks,
> Kyrill
>
> 2015-11-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>
>     PR target/68143
>     * config/arm/arm.c (arm_block_set_unaligned_vect): Keep track of
>     offset from dstbase and use it appropriately in
>     adjust_automodify_address.
>     (arm_block_set_aligned_vect): Likewise.
>
> 2015-11-06  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
>
>     PR target/68143
>     * gcc.target/arm/pr68143_1.c: New test.

  parent reply	other threads:[~2015-11-13 11:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06 10:46 Kyrill Tkachov
2015-11-09  9:27 ` Kyrill Tkachov
2015-11-13 11:52 ` Kyrill Tkachov [this message]
2015-11-17 12:02 ` Ramana Radhakrishnan
2015-11-17 12:58   ` Kyrill Tkachov
2015-11-17 13:22     ` Kyrill 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=5645CED9.8060400@arm.com \
    --to=kyrylo.tkachov@arm.com \
    --cc=Richard.Earnshaw@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --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).