public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jeff Law <law@redhat.com>
To: "Kumar, Venkataramanan" <Venkataramanan.Kumar@amd.com>,
	       Jakub Jelinek <jakub@redhat.com>
Cc: "Richard Beiner (richard.guenther@gmail.com)"
	<richard.guenther@gmail.com>,
	       "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Subject: Re: [RFC] [Patch]: Try and vectorize with shift for mult expr with power 2 integer constant.
Date: Mon, 03 Aug 2015 18:11:00 -0000	[thread overview]
Message-ID: <55BFAEE5.9010303@redhat.com> (raw)
In-Reply-To: <7794A52CE4D579448B959EED7DD0A4723DD201CC@satlexdag06.amd.com>

On 08/02/2015 05:03 AM, Kumar, Venkataramanan wrote:
> Hi Jakub,
>
> Thank you for reviewing the patch.
>
> I have incorporated your comments in the attached patch.
Note Jakub is on PTO for the next 3 weeks.


>
>
>
> vectorize_mults_via_shift.diff.txt
>
>
> diff --git a/gcc/testsuite/gcc.dg/vect/vect-mult-patterns.c b/gcc/testsuite/gcc.dg/vect/vect-mult-patterns.c
Jakub would probably like more testcases :-)

The most obvious thing to test would be other shift factors.

A negative test to verify we don't try to turn a multiply by 
non-constant or multiply by a constant that is not a power of 2 into shifts.

[ Would it make sense, for example, to turn a multiply by 3 into a 
shift-add sequence?  As Jakub said, choose_mult_variant can be your 
friend. ]



> @@ -2147,6 +2152,140 @@ vect_recog_vector_vector_shift_pattern (vec<gimple> *stmts,
>     return pattern_stmt;
>   }
>
> +/* Detect multiplication by constant which are postive or negatives of power 2,
s/postive/positive/


Jeff

  reply	other threads:[~2015-08-03 18:11 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-28 15:30 Kumar, Venkataramanan
2015-07-28 20:24 ` Jakub Jelinek
2015-07-28 20:34   ` Jakub Jelinek
2015-08-02 11:03   ` Kumar, Venkataramanan
2015-08-03 18:11     ` Jeff Law [this message]
2015-08-04  8:52       ` Kumar, Venkataramanan
2015-08-04 10:37         ` Richard Biener
     [not found]           ` <87vbcvjg1y.fsf@e105548-lin.cambridge.arm.com>
     [not found]             ` <CAFiYyc3VLXyjmfCuizFVsQ2nLDjyd_Dr=Po1_qyJ9wcrgCmiWA@mail.gmail.com>
2015-08-04 14:22               ` Richard Biener
2015-08-04 14:28                 ` Richard Sandiford
2015-08-04 16:07                   ` Richard Biener
2015-08-04 16:27                     ` Richard Sandiford
2015-08-04 16:49           ` Kumar, Venkataramanan
2015-08-05  8:51             ` Richard Biener
2015-08-05  9:34               ` Kumar, Venkataramanan
2015-08-05 11:41             ` Richard Biener
2015-08-06 12:04               ` Kumar, Venkataramanan

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=55BFAEE5.9010303@redhat.com \
    --to=law@redhat.com \
    --cc=Venkataramanan.Kumar@amd.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@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).