This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] fix PR middle-end/22480





Fine with me

thanks

dorit

Uros Bizjak <ubizjak@gmail.com> wrote on 09/09/2005 01:07:41 PM:

> On 9/7/05, Dorit Naishlos <DORIT@il.ibm.com> wrote:
>
> > Don't you want to make sure that op1 is actually constant/invariant?
> > You can do that calling
> > 'vect_is_simple_use (op1, loop_vinfo, &def_stmt1, &def1, &dt1);'
> > and you want to check that
> > dt1 == vect_invariant_def || dt1 == vect_invariant_def.
> > (by the way, vect_is_simple_use is already called earlier in that
function,
> > and the last value of 'dt' should hold the information you need).
>
> I was under impression that vect_is_simple use implies check for only
> constants and loop invariants. Anyway, I have added the check you
> suggested.
>
> > Also, do we really want to allow this for any vector operation, or only
for
> > vector shifts? (are there any other vector operations that behave like
> > this?)
>
> I was thinking about multiplicaton (or integer division) of a vector
> value by a vector of equal 2^N constant elements. This operation can
> be simplified to a vector shift, but IMHO this tranformation should be
> done elsewhere.
>
> Attached to this message, please find updated patch that addresses all
> your suggestions. Patch was regtested on i686-pc-linux-gnu for c and
> c++.
>
> 2005-09-09  Uros Bizjak  <uros@kss-loka.si>
>
>    PR middle-end/22480
>
>    * tree-vect-transform.c (vectorizable_operation): Use scalar
>    tree operand op1 as shift operand when shift insn pattern uses
>    scalar shift operand.
>    * Makefile.in (tree-vect-transform.o): Depend on recog.h.
>
> testsuite/ChangeLog:
>
> 2005-09-09  Uros Bizjak  <uros@kss-loka.si>
>
>    PR middle-end/22480
>    * gcc.dg/vect/pr22480.c: New test.
>
> Thanks for review,
> Uros.
> [attachment "pr22480.diff" deleted by Dorit Naishlos/Haifa/IBM]


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]