PR tree-optimization/85793
* tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
for VMAT_ELEMENTWISE.
gcc/testsuite
* gcc.dg/vect/pr85793.c: New test.
Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r260317
+2018-05-17 Bin Cheng <bin.cheng@arm.com>
+ Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/85793
+ * tree-vect-stmts.c (vectorizable_load): Handle 1 element-wise load
+ for VMAT_ELEMENTWISE.
+
2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
* internal-fn.h (lookup_internal_fn): Declare
+2018-05-17 Bin Cheng <bin.cheng@arm.com>
+
+ PR tree-optimization/85793
+ * gcc.dg/vect/pr85793.c: New test.
+
2018-05-17 Richard Sandiford <richard.sandiford@linaro.org>
* gcc.dg/gimplefe-28.c: New test.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_perm } */
+
+int a, c, d;
+long b[6];
+void fn1() {
+ for (; a < 2; a++) {
+ c = 0;
+ for (; c <= 5; c++)
+ d &= b[a * 3];
+ }
+}
}
ltype = build_aligned_type (ltype, TYPE_ALIGN (TREE_TYPE (vectype)));
}
+ /* Load vector(1) scalar_type if it's 1 element-wise vectype. */
+ else if (nloads == 1)
+ ltype = vectype;
+
if (slp)
{
/* For SLP permutation support we need to load the whole group,