[PATCH, testsuite]: Fix recent vect testsuite failures on x86_64
Dorit Nuzman
DORIT@il.ibm.com
Tue Jul 24 09:55:00 GMT 2007
> > *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?
>
> Hm, for x86_64 we have:
>
> /* x86-64 ABI requires arrays greater than 16 bytes to be aligned
> to 16byte boundary. */
> if (TARGET_64BIT)
> {
> if (AGGREGATE_TYPE_P (type)
> && TYPE_SIZE (type)
> && TREE_CODE (TYPE_SIZE (type)) == INTEGER_CST
> && (TREE_INT_CST_LOW (TYPE_SIZE (type)) >= 128
> || TREE_INT_CST_HIGH (TYPE_SIZE (type))) && align < 128)
> return 128;
> }
>
> So this alignment exception applies only to arrays. There is no
> guarantee, that i.e. some unrelated sequence of floats will be aligned
> to vector alignement boundary.
> >
ok, I used a separate keyword, and committed the patch that makes the same
fix for the spu. Attached is the patch I committed.
thanks,
dorit
* lib/target-support.exp
(check_effective_target_natural_alignment):
(check_effective_target_vector_alignment_reachable): New.
* config/spu/spu.c (spu_vector_alignment_reachable): New.
(TARGET_VECTOR_ALIGNMENT_REACHABLE): Define.
* gcc.dg/vect/pr25413a.c: Use vector_alignment_reachable target
check.
* gcc.dg/vect/pr25413.c: Likewise.
* gcc.dg/vect/pr31699.c: Likewise.
(See attached file: pr25413spu)
> > (**) 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").
>
> Of course. I'll just remove "naturally" from the description.
>
> Uros.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr25413spu
Type: application/octet-stream
Size: 7352 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070724/df361499/attachment.obj>
More information about the Gcc-patches
mailing list