[PATCH] Fix PR91114

Richard Biener rguenther@suse.de
Tue Jul 9 13:28:00 GMT 2019


The following fixes PR91114.  It's not really the most desirable
solution but hey.

Bootstrapped / tested on x86_64-unknown-linux-gnu, applied to trunk.

Richard.

2019-07-09  Richard Biener  <rguenther@suse.de>

	PR tree-optimization/91114
	* tree-vect-data-refs.c (vect_analyze_data_refs): Failure to
	find a vector type isn't fatal.

	* gcc.dg/vect/pr91114.c: New testcase.

Index: gcc/tree-vect-data-refs.c
===================================================================
--- gcc/tree-vect-data-refs.c	(revision 273294)
+++ gcc/tree-vect-data-refs.c	(working copy)
@@ -4360,6 +4360,8 @@ vect_analyze_data_refs (vec_info *vinfo,
 	      STMT_VINFO_VECTORIZABLE (stmt_info) = false;
 	      continue;
 	    }
+	  if (fatal)
+	    *fatal = false;
 	  return opt_result::failure_at (stmt_info->stmt,
 					 "not vectorized:"
 					 " no vectype for stmt: %G"
Index: gcc/testsuite/gcc.dg/vect/pr91114.c
===================================================================
--- gcc/testsuite/gcc.dg/vect/pr91114.c	(nonexistent)
+++ gcc/testsuite/gcc.dg/vect/pr91114.c	(working copy)
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-fopenmp-simd" } */
+
+void
+ne (double *zu)
+{
+  int h3;
+
+#pragma omp simd simdlen (4)
+  for (h3 = 0; h3 < 4; ++h3)
+    zu[h3] = 0;
+}



More information about the Gcc-patches mailing list