--- /dev/null
+/* { dg-do compile } */
+/* { dg-additional-options "-O3" } */
+/* { dg-additional-options "-march=armv8.2-a+sve -msve-vector-bits=128" { target aarch64-*-* } } */
+
+int a, b, c;
+static int d;
+short *q;
+void f() {
+ int *p = &d;
+ b = 9;
+ for (b = 9; b; b--) {
+ a = 2;
+ for (c = 2; c <= 9; c++) {
+ for (int i = 0; i < 3; i++)
+ *p |= (*q)++;
+ }
+ }
+}
gimple *child_stmt = SLP_TREE_VEC_STMTS (node)[0];
tree vect_lhs = gimple_get_lhs (child_stmt);
tree root_lhs = gimple_get_lhs (instance->root_stmts[0]->stmt);
+ if (!useless_type_conversion_p (TREE_TYPE (root_lhs),
+ TREE_TYPE (vect_lhs)))
+ vect_lhs = build1 (VIEW_CONVERT_EXPR, TREE_TYPE (root_lhs),
+ vect_lhs);
rstmt = gimple_build_assign (root_lhs, vect_lhs);
}
else if (SLP_TREE_NUMBER_OF_VEC_STMTS (node) > 1)
vec<constructor_elt, va_gc> *v;
vec_alloc (v, nelts);
+ /* A CTOR can handle V16HI composition from VNx8HI so we
+ do not need to convert vector elements if the types
+ do not match. */
FOR_EACH_VEC_ELT (SLP_TREE_VEC_STMTS (node), j, child_stmt)
CONSTRUCTOR_APPEND_ELT (v, NULL_TREE,
gimple_get_lhs (child_stmt));