The following testcase ICEs on powerpc64le-linux. The problem is that
get_vectype_for_scalar_type returns NULL, and while most places in
tree-vect-stmts.c handle that case, this spot doesn't and punts only
if it is non-NULL, but with different number of elts than expected.
2020-01-17 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/93292
* tree-vect-stmts.c (vectorizable_comparison): Punt also if
get_vectype_for_scalar_type returns NULL.
* g++.dg/opt/pr93292.C: New test.
+2020-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/93292
+ * tree-vect-stmts.c (vectorizable_comparison): Punt also if
+ get_vectype_for_scalar_type returns NULL.
+
2020-01-16 Jan Hubicka <hubicka@ucw.cz>
* params.opt (-param=max-predicted-iterations): Increase range from 0.
2020-01-17 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/93292
+ * g++.dg/opt/pr93292.C: New test.
+
PR testsuite/93294
* lib/c-compat.exp (compat-use-alt-compiler): Handle
-fdiagnostics-urls=never similarly to -fdiagnostics-color=never.
--- /dev/null
+// PR tree-optimization/93292
+// { dg-do compile }
+// { dg-options "-O3 -w" }
+
+struct A {
+ static int foo (float x) { static int b; b = x ? x + 0.5 : 0; return b; }
+};
+
+void
+bar (int *d, float e)
+{
+ float g;
+ for (int h = 0; h < 64; h++)
+ {
+ d[h] += A::foo (g < 0 ? : g > 5 ? : g);
+ A::foo (e);
+ }
+}
{
vectype = get_vectype_for_scalar_type (vinfo, TREE_TYPE (rhs1),
slp_node);
- if (maybe_ne (TYPE_VECTOR_SUBPARTS (vectype), nunits))
+ if (!vectype || maybe_ne (TYPE_VECTOR_SUBPARTS (vectype), nunits))
return false;
}
else if (maybe_ne (nunits, TYPE_VECTOR_SUBPARTS (vectype)))