new file mode 100644
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-mavx2" { target avx2 } } */
+
+struct nine_context {
+ unsigned tex_stage[8][33];
+};
+struct fvec4 {
+ float x[2];
+};
+void f(struct fvec4 *dst, struct nine_context *context)
+{
+ unsigned s;
+ for (s = 0; s < 8; ++s)
+ {
+ float *rgba = &dst[s].x[0];
+ unsigned color = context->tex_stage[s][0];
+ rgba[0] = (float)((color >> 16) & 0xFF) / 0xFF;
+ rgba[1] = (float)((color >> 8) & 0xFF) / 0xFF;
+ }
+}
@@ -2192,12 +2192,23 @@ get_group_load_store_type (vec_info *vinfo, stmt_vec_info stmt_info,
&& single_element_p
&& maybe_gt (group_size, TYPE_VECTOR_SUBPARTS (vectype)))
{
- *memory_access_type = VMAT_ELEMENTWISE;
- if (dump_enabled_p ())
- dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
- "single-element interleaving not supported "
- "for not adjacent vector loads, using "
- "elementwise access\n");
+ if (SLP_TREE_LANES (slp_node) == 1)
+ {
+ *memory_access_type = VMAT_ELEMENTWISE;
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "single-element interleaving not supported "
+ "for not adjacent vector loads, using "
+ "elementwise access\n");
+ }
+ else
+ {
+ if (dump_enabled_p ())
+ dump_printf_loc (MSG_MISSED_OPTIMIZATION, vect_location,
+ "single-element interleaving not supported "
+ "for not adjacent vector loads\n");
+ return false;
+ }
}
}
}