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, testsuite]: Fix recent vect testsuite failures on x86_64


> Uros Bizjak wrote:
>
> > 2007-07-13  Uros Bizjak  <ubizjak@gmail.com>
> >
> >        * lib/target-supports.exp
> > (check_effective_target_vect_aligned_arrays):
> >        New procedure to check if arrays are naturally aligned to the
> > vector
> >        alignment boundary.
> >        * gcc.dg/vect/pr25413a.c: Do not include stdarg.h.  Use
> > __SIZE_TYPE__
> >        in size_t typedef.  Adjust tree dump scan results according to
> >        vect_aligned_arrays target check.
> >        * gcc.dg/vect/pr25413.c: Adjust tree dump scan results
> > according to
> >        vect_aligned_arrays target check.
> >        * gcc.dg/vect/pr31699.c: Ditto.
>
> I went ahead and install this patch as it fixes target-dependant failure
> on x86_64. Other targets are not affected.
>

thanks.

we need a similar fix for the spu (*) (**), as pr25413.c also fails on the
spu.
Also pr25413a.c can be vectorized using loop peeling if we implement the
TARGET_VECTOR_ALIGNMENT_REACHABLE builtin for the spu as suggested in the
patch below. Built as a cross, and tested on the vectorizer testcases. ok
to commit?

dorit

(*) I added spu to the list of targets for which
check_effective_target_vect_aligned_arrays returns true, though for the spu
I actually need a function with a different meaning: On the spu it's not
that data-types/arrays are guaranteed to be aligned on a vector-size
boundary, but rather all primitive data-types are guaranteed to be
*naturally* aligned (i.e. aligned on their type-size boundary). Uros, can
we redefine this function in a way that would fit both spu and x86_64? Say,
that data-types are guaranteed to be at least naturally aligned?

(**) by the way, I think we should either define
check_effective_target_vect_aligned_arrays as checking if things are
"naturally aligned" or as checking if things are "aligned to the vector
alignment boundary", but not as it is currently defined, which mixes both
("naturally aligned to the vector alignment boundary").

ChangeLog:

      * lib/target-support.exp (check_effective_target_vect_aligned): add
      target spu.

      * config/spu/spu.c (spu_vector_alignment_reachable): New.
      (TARGET_VECTOR_ALIGNMENT_REACHABLE): Define.

(See attached file: pr25413.spu.txt)

> Uros.

Attachment: pr25413.spu.txt
Description: Text document


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