https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63439

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
So arm uses v16qi, but:

/* { dg-final { scan-tree-dump "Alignment of access forced using peeling"
"vect" { target { vector_alignment_reachable && vect64 } } } } */

so arm also is vect64 (v16qi is 128 bits).  arm vectorizes with v16qi and
unaligned accesses.  But

/* { dg-final { scan-tree-dump "Vectorizing an unaligned access" "vect" {
target { vect_hw_misalign && { ! vect64 } } } } } */

so the issue is that we don't have a vect128 target capability as if
vect_hw_misaling && vect128 we'd expect to vectorize an unaligned access.
Only if vect64 && !vect128 we'd expect to peel for alignment.

Luckily we have vect_multiple_sizes so I can adjust it for arm using that.


For SPARC we use v8qi and peel for alignment.  That should be handled
but it looks like SPARC is not vect64 for whatever reason :/

Rainer, can you please make SPARC vect64?


So I expect

Index: testsuite/gcc.dg/vect/vect-33.c
===================================================================
--- testsuite/gcc.dg/vect/vect-33.c     (revision 220030)
+++ testsuite/gcc.dg/vect/vect-33.c     (working copy)
@@ -38,7 +38,7 @@ int main (void)


 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect"  } } */
-/* { dg-final { scan-tree-dump "Vectorizing an unaligned access" "vect" {
target { vect_hw_misalign && { ! vect64 } } } } } */
-/* { dg-final { scan-tree-dump "Alignment of access forced using peeling"
"vect" { target { vector_alignment_reachable && vect64 } } } } */
+/* { dg-final { scan-tree-dump "Vectorizing an unaligned access" "vect" {
target { vect_hw_misalign && { {! vect64} || vect_multiple_sizes } } } } } */
+/* { dg-final { scan-tree-dump "Alignment of access forced using peeling"
"vect" { target { vector_alignment_reachable && { vect64 && {!
vect_multiple_sizes} } } } } } */
 /* { dg-final { scan-tree-dump-times "Alignment of access forced using
versioning" 1 "vect" { target { { {! vector_alignment_reachable} || {! vect64}
} && {! vect_hw_misalign} } } } } */
 /* { dg-final { cleanup-tree-dump "vect" } } */

to fix it for arm and also work for fixed SPARC.

Reply via email to