As we now ask vect_supportable_dr_alignment for gathers avoid using
(optimized) re-align instructions for them.
PR tree-optimization/122131
* tree-vect-data-refs.cc (vect_supportable_dr_alignment): Do
not use re-align loads for gathers.
* gcc.target/powerpc/altivec-39.c: New testcase.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -maltivec" } */
+/* { dg-require-effective-target powerpc_altivec } */
+
+char *sort_filesquote_name_buf_plimit;
+int sort_filesquote_name_buf_width;
+int *__ctype_b_loc() __attribute__((__const__));
+void sort_filesquote_name_buf(char* p)
+{
+ unsigned displayed_width = 0;
+ while (p < sort_filesquote_name_buf_plimit) {
+ if (__ctype_b_loc()[*p])
+ displayed_width++;
+ p++;
+ }
+ sort_filesquote_name_buf_width = displayed_width;
+}
}
} */
- if (DR_IS_READ (dr))
+ if (DR_IS_READ (dr) && !is_gather_scatter)
{
if (can_implement_p (vec_realign_load_optab, mode)
&& (!targetm.vectorize.builtin_mask_for_load