+2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
+
+ PR tree-optimization/83753
+ * tree-vect-stmts.c (get_group_load_store_type): Use VMAT_CONTIGUOUS
+ for non-strided grouped accesses if the number of elements is 1.
+
2018-01-10 Jan Hubicka <hubicka@ucw.cz>
PR target/81616
+2018-01-10 Richard Sandiford <richard.sandiford@linaro.org>
+
+ PR tree-optimization/83753
+ * gcc.dg/torture/pr83753.c: New test.
+
2018-01-09 Jan Hubicka <hubicka@ucw.cz>
* gcc.target/i386/avx2-gather-1.c: Add -march.
&& (can_overrun_p || !would_overrun_p)
&& compare_step_with_zero (stmt) > 0)
{
- /* First try using LOAD/STORE_LANES. */
- if (vls_type == VLS_LOAD
- ? vect_load_lanes_supported (vectype, group_size)
- : vect_store_lanes_supported (vectype, group_size))
+ /* First cope with the degenerate case of a single-element
+ vector. */
+ if (known_eq (TYPE_VECTOR_SUBPARTS (vectype), 1U))
+ *memory_access_type = VMAT_CONTIGUOUS;
+
+ /* Otherwise try using LOAD/STORE_LANES. */
+ if (*memory_access_type == VMAT_ELEMENTWISE
+ && (vls_type == VLS_LOAD
+ ? vect_load_lanes_supported (vectype, group_size)
+ : vect_store_lanes_supported (vectype, group_size)))
{
*memory_access_type = VMAT_LOAD_STORE_LANES;
overrun_p = would_overrun_p;