Hi, This is another vect case which requires special handling with vect_hw_misalign. The alignment of the second part requires misaligned vector access supports. This patch is to adjust the related guard condition and comments.
Verified it on ppc64-redhat-linux (Power7 BE). Is it ok for trunk? BR, Kewen -------- gcc/testsuite/ChangeLog 2020-04-08 Kewen Lin <li...@gcc.gnu.org> PR testsuite/94023 * gfortran.dg/vect/pr83232.f90: Expect 2 rather than 3 times SLP on non-vect_hw_misalign targets. diff --git a/gcc/testsuite/gfortran.dg/vect/pr83232.f90 b/gcc/testsuite/gfortran.dg/vect/pr83232.f90 index a353578..af88342 100644 --- a/gcc/testsuite/gfortran.dg/vect/pr83232.f90 +++ b/gcc/testsuite/gfortran.dg/vect/pr83232.f90 @@ -27,5 +27,7 @@ call foo (Einc) END SUBROUTINE -! We should vectorize (1), (2) and (3) -! { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "slp1" } } +! We should vectorize (1), (2) and (3) under vect_hw_misalign. +! { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 3 "slp1" { target vect_hw_misalign } } } +! But only (1) and (3) under !vect_hw_misalign due to the alignment of (2). +! { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "slp1" { target { ! vect_hw_misalign } } } }