https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69264
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jakub at gcc dot gnu.org --- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> --- This is a consequence of the r198767 change IMHO, which changed: @@ -4736,9 +4730,10 @@ if (!known_alignment_for_access_p (dr)) is_packed = not_size_aligned (DR_REF (dr)); - if (targetm.vectorize. - support_vector_misalignment (mode, type, - DR_MISALIGNMENT (dr), is_packed)) + if ((TYPE_USER_ALIGN (type) && !is_packed) + || targetm.vectorize. + support_vector_misalignment (mode, type, + DR_MISALIGNMENT (dr), is_packed)) return dr_unaligned_supported; } i.e. the support_vector_misalignment target hook is not even considered when TYPE_USER_ALIGN (type), which is this case. Richard, that was your change, can you please have a look? Either the backends need to accept that even when they return false in support_vector_misalignment, it might be asked for costs of some misaligned load (and thus should not assert it will not happen, but instead say return very high cost), or the r198767 change was wrong, or we need to ask if support_vector_misalignment decision is an optimization decision or ISA decision, if it is just optimization decision, TYPE_USER_ALIGN could override it, while if it is ISA decision, it should not.