This is an archive of the discontinued LLVM Phabricator instance.

[VectorCombine] optimize alignment for load transform
ClosedPublic

Authored by spatel on Dec 16 2020, 10:08 AM.

Details

Summary

Here's another minimal step suggested by D93229 / D93397 .
(I'm trying to be extra careful in these changes because load transforms are easy to get wrong.)

We can optimistically choose the greater alignment of a load and its pointer operand. As the test diffs show, this can improve what would have been unaligned vector loads into aligned loads.

When we enhance with gep offsets, we will need to adjust the alignment calculation to include that offset.

Diff Detail

Event Timeline

spatel created this revision.Dec 16 2020, 10:08 AM
spatel requested review of this revision.Dec 16 2020, 10:08 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 16 2020, 10:08 AM
This revision is now accepted and ready to land.Dec 16 2020, 10:13 AM
This revision was automatically updated to reflect the committed changes.