]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
PR testsuite/106879 FAIL: gcc.dg/vect/bb-slp-layout-19.c on powerpc64
authorJiufu Guo <guojiufu@linux.ibm.com>
Tue, 18 Apr 2023 07:56:53 +0000 (15:56 +0800)
committerJiufu Guo <guojiufu@linux.ibm.com>
Thu, 20 Apr 2023 03:19:24 +0000 (11:19 +0800)
On P7, option -mno-allow-movmisalign is added during testing, which
prevents slp happen on the case.

Like PR65484 and PR87306, this patch use vect_hw_misalign to guard
the case on powerpc targets.

gcc/testsuite/ChangeLog:

PR testsuite/106879
* gcc.dg/vect/bb-slp-layout-19.c: Modify to guard the check with
vect_hw_misalign on POWERs.

gcc/testsuite/gcc.dg/vect/bb-slp-layout-19.c

index f075a83a25ba618550caba33e85449bcbda356d5..847a07bd5beab262d419af4852f451be487f875b 100644 (file)
@@ -31,4 +31,9 @@ void f()
   e[3] = b3;
 }
 
-/* { dg-final { scan-tree-dump-times "add new stmt: \[^\\n\\r\]* = VEC_PERM_EXPR" 3 "slp1" { target { vect_int_mult && vect_perm } } } } */
+/* On older powerpc hardware (POWER7 and earlier), the default flag
+   -mno-allow-movmisalign prevents vectorization.  On POWER8 and later,
+   when vect_hw_misalign is true, vectorization occurs.  For other
+   targets, ! vect_no_align is a sufficient test.  */
+
+/* { dg-final { scan-tree-dump-times "add new stmt: \[^\\n\\r\]* = VEC_PERM_EXPR" 3 "slp1" { target { { vect_int_mult && vect_perm } && { { ! powerpc*-*-* } || { vect_hw_misalign } } } } } } */