This is an archive of the discontinued LLVM Phabricator instance.

[LV] Deny irregular types in interleavedAccessCanBeWidened
ClosedPublic

Authored by bjope on Jun 16 2019, 8:35 AM.

Details

Summary

Avoid that loop vectorizer creates loads/stores of vectors
with "irregular" types when interleaving. An example of
an irregular type is x86_fp80 that is 80 bits, but that
may have an allocation size that is 96 bits. So an array
of x86_fp80 is not bitcast compatible with a vector
of the same type.

Not sure if interleavedAccessCanBeWidened is the best
place for this check, but it solves the problem seen
in the added test case. And it is the same kind of check
that already exists in memoryInstructionCanBeWidened.

Event Timeline

bjope created this revision.Jun 16 2019, 8:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 16 2019, 8:35 AM
fhahn accepted this revision.Jun 17 2019, 3:16 AM

LGTM, thanks. Yes, we already have a similar check in memoryInstructionCanBeWidened and we need the same check here as well.

This revision is now accepted and ready to land.Jun 17 2019, 3:16 AM
This revision was automatically updated to reflect the committed changes.