I changed xfails to target-checks - for now I use common vect_multiple_sizes (though it'll fail when wider vectors emerge). Also, I changed AVX-check to the version Uros suggested. Please check updated patch (attached).
As for vect_multiple_sizes_32B_16B and similar - isn't it too target-specific? I think if we want to keep everything as general as possible, we should have something like vect_1_vector_size_available, vect_2_vector_sizes_available, etc. New changelog: 2011-12-12 Michael Zolotukhin <michael.v.zolotuk...@intel.com> * gcc.dg/vect/no-section-anchors-vect-31.c: Adjust diagnostic test to fix fail on AVX. * gcc.dg/vect/no-section-anchors-vect-66.c: Ditto. * gcc.dg/vect/no-section-anchors-vect-68.c: Ditto. * gcc.dg/vect/no-section-anchors-vect-69.c: Ditto. * gcc.dg/vect/no-vfa-vect-dv-2.c: Ditto. * gcc.dg/vect/pr45752.c: Ditto. * gcc.dg/vect/slp-perm-4.c: Ditto. * gcc.dg/vect/slp-perm-9.c: Ditto. * gcc.dg/vect/vect-33.c: Ditto. * gcc.dg/vect/vect-35.c: Ditto. * gcc.dg/vect/vect-6-big-array.c: Ditto. * gcc.dg/vect/vect-6.c: Ditto. * gcc.dg/vect/vect-91.c: Ditto. * gcc.dg/vect/vect-all-big-array.c: Ditto. * gcc.dg/vect/vect-all.c: Ditto. * gcc.dg/vect/vect-multitypes-1.c: Ditto. * gcc.dg/vect/vect-outer-4c.c: Ditto. * gcc.dg/vect/vect-outer-5.c: Ditto. * gcc.dg/vect/vect-over-widen-1.c: Ditto. * gcc.dg/vect/vect-over-widen-3.c: Ditto. * gcc.dg/vect/vect-over-widen-4.c: Ditto. * gcc.dg/vect/vect-peel-1.c: Ditto. * gcc.dg/vect/vect-peel-2.c: Ditto. * gcc.dg/vect/vect-peel-3.c: Ditto. * gcc.dg/vect/vect-reduc-pattern-1b.c: Ditto. * gcc.dg/vect/vect-reduc-pattern-1c.c: Ditto. * gcc.dg/vect/vect-reduc-pattern-2b.c: Ditto. * gcc.dg/vect/wrapv-vect-reduc-pattern-2c.c: Ditto. * gcc.dg/vect/no-section-anchors-vect-36.c: Adjust array size to fix fail on AVX. * gcc.dg/vect/no-section-anchors-vect-64.c: Ditto. * lib/target-supports.exp (check_effective_target_vect_any_perm): New function. (check_avx_available): Ditto. (check_effective_target_vect_aligned_arrays): Add handling of AVX. (check_effective_target_vect_multiple_sizes): Ditto. On 12 December 2011 12:32, Uros Bizjak <ubiz...@gmail.com> wrote: > Hello! > >> This patch fixes dg-final scans in tests from vect.exp suite, which >> currently fail when avx2 is used. > > --- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-31.c > +++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-31.c > @@ -88,5 +88,6 @@ int main (void) > > /* { dg-final { scan-tree-dump-times "vectorized 4 loops" 1 "vect" } } */ > /* { dg-final { scan-tree-dump-times "Vectorizing an unaligned > access" 0 "vect" } } */ > -/* { dg-final { scan-tree-dump-times "Alignment of access forced > using peeling" 2 "vect" } } */ > +/* { dg-final { scan-tree-dump-times "Alignment of access forced > using peeling" 2 "vect" { target {! vect_multiple_sizes} } } } */ > +/* { dg-final { scan-tree-dump-times "Alignment of access forced > using peeling" 2 "vect" { xfail vect_multiple_sizes} } } */ > /* { dg-final { cleanup-tree-dump "vect" } } */ > > Please do not add xfails through the patch, xfail means that a problem > was identified and will someday be fixed. In the above case, just add > target condition, no need for xfailed scan. If I'm not missing > simething, you can probably remove all introduced xfails, just add new > target conditions. > > # Return 1 if avx instructions can be compiled. > > +proc check_effective_explicit_target_avx { } { > + return [check_no_messages_and_pattern e_avx > "!__builtin_ia32_vzeroall" assembly { > + void _mm256_zeroall (void) > + { > + __builtin_ia32_vzeroall (); > + } > + } "-O2" ] > +} > > Please use > > # Return true if we are compiling for AVX target. > > proc check_avx_available { } { > return [check_no_compiler_messages avx_available assembly { > #ifndef __AVX__ > #error unsupported > #endif > } ""] > } > > Uros. -- --- Best regards, Michael V. Zolotukhin, Software Engineer Intel Corporation.
vec-tests-avx2_fixes-2.patch
Description: Binary data