diff --git a/gcc/tree-vect-stmts.cc b/gcc/tree-vect-stmts.cc index 522e9f7f90fdc290483f791ff0897684c2a834f4..75973c77236ebabd819eead35b90299a7d26fc00 100644 --- a/gcc/tree-vect-stmts.cc +++ b/gcc/tree-vect-stmts.cc @@ -10650,9 +10650,19 @@ vectorizable_load (vec_info *vinfo, of it. */ if (n == const_nunits) { - nloads = 1; - lnel = const_nunits; - ltype = vectype; + int mis_align = dr_misalignment (first_dr_info, vectype); + dr_alignment_support dr_align + = vect_supportable_dr_alignment (vinfo, dr_info, vectype, + mis_align); + if (dr_align == dr_aligned + || dr_align == dr_unaligned_supported) + { + nloads = 1; + lnel = const_nunits; + ltype = vectype; + alignment_support_scheme = dr_align; + misalignment = mis_align; + } } /* Else use the biggest vector we can load the group without accessing excess elements. */