[PATCH, rs6000] Fix PR65546

Bill Schmidt wschmidt@linux.vnet.ibm.com
Thu Jan 28 22:41:00 GMT 2016


Hi,

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65546 identifies a failure
in gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c.  The test case hasn't
kept up with changes in the vectorizer, so it's looking for the wrong
error message.  Also, the error message should be conditioned by a check
for support of unaligned memory accesses.  This patch corrects these
problems.

For 4.9 and 5, the error message needs to be similarly changed.
However, for these earlier releases, the check for misalignment support
doesn't apply.

Verified on powerpc64le-unknown-linux-gnu for both -mcpu=power7 and
-mcpu=power8, which differ in their support for misalignment.  Is this
ok for trunk?  Provided verification succeeds on 4.9 and 5, is the
revised test ok for those releases?

Thanks,
Bill


2016-01-28  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>

	PR target/65546
	* gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c: Correct
	condition being checked, and disable it when the target supports
	misaligned loads and stores.


Index: gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c
===================================================================
--- gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c	(revision 232890)
+++ gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-vect-31a.c	(working copy)
@@ -46,5 +46,5 @@ int main (void)
   return main1 ();
 } 
 
-/* { dg-final { scan-tree-dump-times "vectorization not profitable" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "not vectorized: unsupported unaligned store" 1 "vect" { target { ! vect_hw_misalign } } } } */
 /* { dg-final { scan-tree-dump-times "vectorized 1 loops" 0 "vect" { target { ! vect_hw_misalign } } } } */




More information about the Gcc-patches mailing list