+2016-01-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/69083
+ * tree-vect-slp.c (vect_get_constant_vectors): For
+ VECTOR_BOOLEAN_TYPE_P assert op is fold_convertible_p to vector_type's
+ element type. If op is fold_convertible_p to vector_type's element
+ type, use NOP_EXPR instead of VCE.
+
2016-01-08 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/67778
+2016-01-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/69083
+ * gcc.dg/vect/pr69083.c: New test.
+
2016-01-08 Sujoy Saraswati <sujoy.saraswati@hpe.com>
PR tree-optimization/61441
--- /dev/null
+/* PR tree-optimization/69083 */
+/* { dg-do compile } */
+/* { dg-additional-options "-O3" } */
+
+int d;
+short f;
+
+void
+foo (int a, int b, int e, short c)
+{
+ for (; e; e++)
+ {
+ int j;
+ for (j = 0; j < 3; j++)
+ {
+ f = 7 >> b ? a : b;
+ d |= c == 1 ^ 1 == f;
+ }
+ }
+}
{
tree new_temp = make_ssa_name (TREE_TYPE (vector_type));
gimple *init_stmt;
- op = build1 (VIEW_CONVERT_EXPR, TREE_TYPE (vector_type), op);
- init_stmt
- = gimple_build_assign (new_temp, VIEW_CONVERT_EXPR, op);
+ if (VECTOR_BOOLEAN_TYPE_P (vector_type))
+ {
+ gcc_assert (fold_convertible_p (TREE_TYPE (vector_type),
+ op));
+ init_stmt = gimple_build_assign (new_temp, NOP_EXPR, op);
+ }
+ else if (fold_convertible_p (TREE_TYPE (vector_type), op))
+ init_stmt = gimple_build_assign (new_temp, NOP_EXPR, op);
+ else
+ {
+ op = build1 (VIEW_CONVERT_EXPR, TREE_TYPE (vector_type),
+ op);
+ init_stmt
+ = gimple_build_assign (new_temp, VIEW_CONVERT_EXPR,
+ op);
+ }
gimple_seq_add_stmt (&ctor_seq, init_stmt);
op = new_temp;
}