This is an archive of the discontinued LLVM Phabricator instance.

[InterleavedAccessPass] Don't increase the number of bytes loaded.
ClosedPublic

Authored by efriedma on Mar 28 2019, 12:10 PM.

Details

Summary

Even if the interleaving transform would otherwise be legal, we shouldn't introduce an interleaved load that is wider than the original load: it might have undefined behavior.

It might be possible to perform some sort of mask-narrowing transform in some cases (using a narrower interleaved load, then extending the results using shufflevectors). But I haven't tried to implement that, at least for now.

Fixes https://bugs.llvm.org/show_bug.cgi?id=41245 .

Diff Detail

Repository
rL LLVM

Event Timeline

efriedma created this revision.Mar 28 2019, 12:10 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 28 2019, 12:10 PM
Herald added a subscriber: javed.absar. · View Herald Transcript
asbirlea accepted this revision.Mar 28 2019, 1:27 PM

LGTM. Thank you!

This revision is now accepted and ready to land.Mar 28 2019, 1:27 PM
This revision was automatically updated to reflect the committed changes.