+2015-12-18 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ PR tree-optimization/68956
+ * tree-vect-stmts.c (vect_init_vector): Fix constants
+ used for boolean vectors.
+
2015-12-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR rtl-optimization/68796
+2015-12-18 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ PR tree-optimization/68956
+ * gcc.target/i386/pr68956.c: New test.
+
2015-12-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
PR rtl-optimization/68796
--- /dev/null
+/* { dg-do run } */
+/* { dg-options "-O2 -ffast-math -mfpmath=sse -mavx2 -ftree-vectorize" } */
+/* { dg-require-effective-target avx2 } */
+
+#include "avx2-check.h"
+
+extern void abort (void);
+
+int l;
+
+static void __attribute__((noclone,noinline))
+test1 (double *in1, double *in2, double *out,
+ int l1, int l2, int *n)
+{
+ double sum;
+ int na = n[0];
+ int nb = n[1];
+ int i;
+ _Bool ic, jc;
+
+ jc = (l > na) && (l > nb);
+ for (int i = 0; i < l2; i++)
+ {
+ ic = (i <= na) && (i <= nb);
+ sum = 0;
+ if (ic && jc)
+ sum = in1[i] + in2[i];
+ out[i] = sum;
+ }
+}
+
+static void
+avx2_test (void)
+{
+ double in1[40], in2[40], out[40], sum;
+ int n[2],l1,l2,i,na,nb;
+ _Bool ic, jc;
+
+ l = 0;
+ l1 = 8;
+ l2 = 40;
+ n[0] = 14;
+ n[1] = 13;
+
+ for (i = 0; i < l2; i++)
+ {
+ in1[i] = i;
+ in2[i] = i;
+ out[i] = 0;
+ }
+
+ test1 (in1, in2, out, l1, l2, n);
+
+ na = n[0];
+ nb = n[1];
+
+ jc = (l > na) && (l > nb);
+ for (int i = 0; i < l2; i++)
+ {
+ ic = (i <= na) && (i <= nb);
+ sum = 0;
+ if (ic && jc)
+ sum = in1[i] + in2[i];
+ if (out[i] != sum)
+ abort ();
+ }
+}
all zeros or all ones value before building a vector. */
if (VECTOR_BOOLEAN_TYPE_P (type))
{
- tree true_val = build_zero_cst (TREE_TYPE (type));
- tree false_val = build_all_ones_cst (TREE_TYPE (type));
+ tree true_val = build_all_ones_cst (TREE_TYPE (type));
+ tree false_val = build_zero_cst (TREE_TYPE (type));
if (CONSTANT_CLASS_P (val))
val = integer_zerop (val) ? false_val : true_val;