From: Sudakshina Das <Sudi.Das@arm.com>
To: "law@redhat.com" <law@redhat.com>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: Richard Sandiford <Richard.Sandiford@arm.com>,
Richard Biener <richard.guenther@gmail.com>
Subject: Re: Fwd: [PATCH, GCC, Vect] Fix costing for vector shifts
Date: Mon, 09 Dec 2019 10:23:00 -0000 [thread overview]
Message-ID: <c23e68b2-13ce-c106-2f7d-0bf928f7571f@arm.com> (raw)
In-Reply-To: <cfda82d50c9700d384a234c92cbcacfb023b90d1.camel@redhat.com>
Hi Jeff
On 07/12/2019 17:44, Jeff Law wrote:
> On Fri, 2019-12-06 at 14:05 +0000, Sudakshina Das wrote:
>> Hi
>>
>> While looking at the vectorization for following example, we
>> realized
>> that even though vectorizable_shift function was distinguishing
>> vector
>> shifted by vector from vector shifted by scalar, while modeling the
>> cost
>> it would always add the cost of building a vector constant despite
>> not
>> needing it for vector shifted by scalar.
>>
>> This patch fixes this by using scalar_shift_arg to determine whether
>> we
>> need to build a vector for the second operand or not. This reduces
>> prologue cost as shown in the test.
>>
>> Build and regression tests pass on aarch64-none-elf and
>> x86_64-pc-linux-gnu-gcc. This gives a 3.42% boost to 525.x264_r in
>> Spec2017 for AArch64.
>>
>> gcc/ChangeLog:
>>
>> 2019-xx-xx Sudakshina Das <sudi.das@arm.com>
>> Richard Sandiford <richard.sandiford@arm.com>
>>
>> * tree-vect-stmt.c (vectorizable_shift): Condition ndts for
>> vect_model_simple_cost call on scalar_shift_arg.
>>
>> gcc/testsuite/ChangeLog:
>>
>> 2019-xx-xx Sudakshina Das <sudi.das@arm.com>
>>
>> * gcc.dg/vect/vect-shift-5.c: New test.
> It's a bit borderline, but it's really just twiddling a cost, so OK.
Thanks :) Committed as r279114.
Sudi
>
> jeff
>
next prev parent reply other threads:[~2019-12-09 10:23 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <bd1be471-af66-45dc-e05f-7bd04966f0e7@arm.com>
2019-12-06 14:05 ` Sudakshina Das
2019-12-07 17:44 ` Jeff Law
2019-12-09 10:23 ` Sudakshina Das [this message]
2019-12-10 9:01 ` Christophe Lyon
2019-12-10 10:43 ` Sudakshina Das
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=c23e68b2-13ce-c106-2f7d-0bf928f7571f@arm.com \
--to=sudi.das@arm.com \
--cc=Richard.Sandiford@arm.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=law@redhat.com \
--cc=richard.guenther@gmail.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).