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]

RFA: Avoid versioning loop with unaligned step


eSi-RISC has vector permute functionality, but no unaligned loads. We see execution failures on gcc.dg/vect/slp-perm-12.c because loop versioning is used to make the tptr aligned for the first loop iteration, and then with a step of originally 11, 22 after vectorization, and a vector alignment of 8 bytes, the second iteration causes an AlignmentError exception. The attached patch to tree-vect-data-refs.c suppresses attempts to align data accesses where the step alignment times the vectorization factor is insufficient to sustain the alignment during the loop.
Bootstrapped and regression tested on x86_64-pc-linux-gnu .

I have also attached a matching testsuite patch to not expect SLP vectorization for slp-perm-12 when no unaligned loads are available, although in terms of testing, I can only say that it works for us.

Attachment: aligned-step-diff-r267262.txt
Description: Text document

Attachment: aligned-step-diff-testsuite.txt
Description: Text document


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