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 vectorizer testcases


>
> Fix vectorizer testcases mainly to pass on SPU and 750cl.
>
> Tested on SPU and PowerPC.
> O.K. for mainline?
>

Hi,

please see a few comments below:

> Thanks,
> Revital and Ira
>
> ChangeLog entry:
>
>       * gcc.dg/vect/vect-ifcvt-5.c: Require vect_int.
>       * gcc.dg/vect/pr33369.c: Likewise.
>       * gcc.dg/vect/slp-33.c: Add spaces.
>       * gcc.dg/vect/no-scevccp-outer-18.c: Target vect_interleave.

Generally ChangeLog entries should be real sentances, e.g. instead of the
above write "Enable only for vect_interleave targets" or "Add
vect_interleave target keyword". (Also in other occurences below).

>       * gcc.dg/vect/vect-ifcvt-6.c: Require vect_int.
>       * gcc.dg/vect/no-scevccp-outer-19.c: Xfail on vect_no_shortint_cvt.

You should instead Xfail for targets that don't support vector unpacking
(widening from short to int is achieved by the idioms VEC_UNPACK_HI/LO).
There's already a target keywork for that ("vect_unpack").

>       * gcc.dg/vect/vect-ifcvt-7.c: Require vect_int.
>       * gcc.dg/vect/vect-strided-store-u16-i4.c: Target
> !vect_no_shortint_cvt.

same as above

>       * gcc.dg/vect/slp-10.c: Add spaces.
>       * gcc.dg/vect/no-scevccp-outer-21.c: Xfail on vect_no_intshort_cvt.

You should instead Xfail for targets that don't support vector packing
(narrowing from int to short is achieved by the idiom VEC_PACK_TRUNC).
There's already a target keywork for that ("vect_pack_trunc").

>       * gcc.dg/vect/slp-36.c: Require vect_int.
>       * gcc.dg/vect/vect-strided-store-u32-i2.c,
> gcc.dg/vect/vect-ifcvt-2.c,
>       gcc.dg/vect/vect-ifcvt-3.c, gcc.dg/vect/vect-82.c,
>       gcc.dg/vect/vect-83.c: Likewise.
>       * gcc.dg/vect/no-scevccp-outer-16.c: Xfail on vect_no_shortint_cvt.

Same as above

>       * gcc.dg/vect/no-scevccp-outer-17.c: Likewise.
>       * lib/target-supports.exp (vect_no_intshort_cvt): New.
>       (vect_no_shortint_cvt): New.

As mentioned above, I think there shouldn't be a need for such keywords.

>       (vect_aligned_arrays): Depend on natural_alignment_32.
>       (natural_alignment): Split into...
>       (natural_alignment_32, natural_alignment_64): New.
>       (alignment_reachable_for_double): Depend on natural_alignment_64.
>

About the natural_alignment_32/natural_alignment_64 functions: I would
prefer if a testsuite maintainer could also take a look. The idea is to
differentiate between targets that guarantee natural alignment for types
whose size is 32-bit or less (presumably all targets but 64-bit darwin),
and targets that can also guarantee natural alignment for types whose size
is 64-bit or less (presumably all 64-bit targets but darwin). The question
is whether these two functions indeed implement the above descriptions. (A
separate question is whether these descriptions are correct, but any
testsuite regressions will answer this question...).

> +# Return 1 if types (32 bit and less types) are naturally aligned
> +# (aligned to their type-size), 0 otherwise.

Just w.r.t phrasing: "Return 1 if types of size 32-bit or less are ..."

> @@ -2195,7 +2255,8 @@
>     if [info exists et_vector_alignment_reachable_for_double_saved] {
>         verbose
"check_effective_target_vector_alignment_reachable_for_double: using cached
result" 2
>     } else {
> -        if { [check_effective_target_vect_aligned_arrays] } {
> +        if { [check_effective_target_vect_aligned_arrays]
> +              || [check_effective_target_natural_alignment_64] } {

Maybe we can take this opportunity to change the name of this function to
vector_alignment_reachable_for_64bit (instead of
vector_alignment_reachable_for_double, cause it should be relevant also for
64-bit longs). And also indicate in the documentation of
target_vector_alignment_reachable that it refers to types whose size is
32-bit or less.

ok with above fixes,

thanks,
dorit

> (See attached file: tests.txt)
>
> [attachment "tests.txt" deleted by Dorit Nuzman/Haifa/IBM]


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