The patch fixes the following 2 issues:
.MASK_STORE_LANES (&a, 4B, max_mask_34, vect_array.12);
here we miss to return the last argument as stored value.
ivtmp_32 = ivtmp_31 + POLY_INT_CST [4, 4];
here we miss a bail out in vect_recog_over_widening_pattern.
gcc/ChangeLog:
PR tree-optimization/97079
* internal-fn.c (internal_fn_stored_value_index): Handle also
.MASK_STORE_LANES.
* tree-vect-patterns.c (vect_recog_over_widening_pattern): Bail
out for unsupported TREE_TYPE.
gcc/testsuite/ChangeLog:
PR tree-optimization/97079
* gcc.target/aarch64/sve/pr97079.c: New test.
switch (fn)
{
case IFN_MASK_STORE:
+ case IFN_MASK_STORE_LANES:
case IFN_SCATTER_STORE:
case IFN_MASK_SCATTER_STORE:
case IFN_LEN_STORE:
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O3 -march=armv8.2-a+sve" } */
+
+void g(void);
+
+int a[8][3];
+int b;
+void c(void)
+{
+ int d[] = {7, 3};
+ int *e = a[0];
+ int f;
+ b = 0;
+ for (; b < 8; b++)
+ {
+ f = 0;
+ for (; f < 3; f++)
+ a[b][f] = 0;
+ }
+ g();
+ *e = (long)d;
+}
single_use_p |= op_single_use_p;
}
}
+ else
+ return NULL;
}
/* Although the operation could be done in operation_precision, we have