https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116855
Tamar Christina <tnfchris at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |tnfchris at gcc dot gnu.org --- Comment #4 from Tamar Christina <tnfchris at gcc dot gnu.org> --- (In reply to Richard Biener from comment #3) > I would suggest to add a STMT_VINFO_ENSURE_NOTRAP or so and delay actual > verification to vectorizable_load when both vector type and VF are fixed. > We'd then likely need a LOOP_VINFO_MUST_USE_PARTIAL_VECTORS_P set > conservatively the other way around from > LOOP_VINFO_CAN_USE_PARTIAL_VECTORS_P. > Alignment peeling could then peel if STMT_VINFO_ENSURE_NOTRAP and the target > cannot do full loop masking. Yeah the original reported testcase is fine as the alignment makes it safe. For the manually misaligned case that Andrew posted it makes sense to delay and re-evaluate later on. I don't think we should bother peeling though, I don't think they're that common and alignment peeling breaks some dominators and exposes some existing vectorizer bugs, which is being fixed in Alex's patch. So at least alignment peeling I'll defer to a later point and instead just reject loops that are loading from structures the user misaligned wrt to the vector mode. So mine..