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] Adjust diag-scans in vect-tests to fix fails on AVX/AVX2


Thanks!
Yes, those xpasses were introduced by the changes in dg-scans I
recently made, but I'm not sure if there is an error in them: in these
three tests compiler for some reason assume that arrays are aligned to
16 byte even in 32-bit mode (AFAIK, ABI requirement for arrays
alignment is alignment of their elements, that is 4 bytes for int, 2
bytes for short). Is it a correct behaviour of the compiler? If so,
dg-scan could be adjusted one more time - we could separate AVX-mode
from all other modes using vect_sizes_32B_16B and that'll solve the
problem (please check the corresponding changes in the attached
patch).

On 22 December 2011 00:16, Uros Bizjak <ubizjak@gmail.com> wrote:
> On Mon, Dec 19, 2011 at 9:47 AM, Michael Zolotukhin
> <michael.v.zolotukhin@gmail.com> wrote:
>>> What do you mean no tests require it? ?For instance, all of the ones
>>> that currently pass with with vect_perm?
>> Current implementation of vect_perm doesn't check for SSSE3 - so any
>> x86 target is supposed to support permutation.
>>
>>> Just leave vect_perm alone for now. ?That may not be absolutely
>>> correct either, but it's the good temporary solution that involves
>>> the minimal amount of churn.
>> Ok, those were just attempts to adjust dg-scans in slp-perm-9.c, in
>> which one more loop was vectorized when compiled with -mavx2. In fact,
>> just SSSE3 isn't enough for vectorization of this loop - it seems that
>> vector size also matters, so I undid changes in vect_perm and just add
>> a vect-size check to the test - could you please check if the changes
>> are ok?
>
> It looks to me that the patch introduced some XFAILs on 32bit target ?[1]:
>
> XPASS: gcc.dg/vect/vect-multitypes-1.c scan-tree-dump-times vect
> "Alignment of access forced using peeling" 2
> XPASS: gcc.dg/vect/vect-multitypes-1.c scan-tree-dump-times vect
> "Vectorizing an unaligned access" 4
> XPASS: gcc.dg/vect/vect-peel-3.c scan-tree-dump-times vect
> "Vectorizing an unaligned access" 1
> XPASS: gcc.dg/vect/vect-peel-3.c scan-tree-dump-times vect "Alignment
> of access forced using peeling" 1
> XPASS: gcc.dg/vect/vect-multitypes-1.c -flto scan-tree-dump-times vect
> "Alignment of access forced using peeling" 2
> XPASS: gcc.dg/vect/vect-multitypes-1.c -flto scan-tree-dump-times vect
> "Vectorizing an unaligned access" 4
> XPASS: gcc.dg/vect/vect-peel-3.c -flto scan-tree-dump-times vect
> "Vectorizing an unaligned access" 1
> XPASS: gcc.dg/vect/vect-peel-3.c -flto scan-tree-dump-times vect
> "Alignment of access forced using peeling" 1
> XPASS: gcc.dg/vect/no-section-anchors-vect-69.c scan-tree-dump-times
> vect "Alignment of access forced using peeling" 2
>
> [1] http://gcc.gnu.org/ml/gcc-testresults/2011-12/msg02220.html
>
> Uros.



-- 
---
Best regards,
Michael V. Zolotukhin,
Software Engineer
Intel Corporation.

Attachment: vec-tests-avx2_fixes-7.patch
Description: Binary data


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