Hi! On Wed, Jan 16, 2019 at 05:29:30PM +0800, Kewen.Lin wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87306, it's older POWER > hardware specific test case issue. On POWER7 and earlier, we implicitly > set flag -mno-allow-movmisalign which disables vectorization when to > vectorize the code requires that misaligned loads and stores. For POWER8 > and upper, the opposite value is implicitly set(-mallow-movmisalign), > then the vectorization performs as expected. > > Similar to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65484, the proposed > fix is to make dg-final checks whether vect_hw_misalign support on powerpc, > only further verify the dump pattern when it's on to consitent to the > behavior.
> 2019-01-16 Kewen Lin <li...@gcc.gnu.org> > > PR target/87306 > * gcc.dg/vect/bb-slp-pow-1.c : Modify to reflect that the loop is not No space before the colon. > vectorized on POWER unless hardware misaligned loads are available. > > diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c > b/gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c > index 5a05bd4..6742e12 100644 > --- a/gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c > +++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pow-1.c > @@ -25,4 +25,8 @@ main (void) > return 0; > } > > -/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" } } */ > +/* 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. */ Two spaces after a full stop. > +/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp2" { > target {{ ! powerpc*-*-* } || { powerpc*-*-* && vect_hw_misalign }} } } } */ Okay for trunk with those things fixed. Thanks! Segher