This is an archive of the discontinued LLVM Phabricator instance.

[ARM][MVE] Fix location of optimized gather addresses
ClosedPublic

Authored by anwel on Apr 16 2020, 5:34 AM.

Details

Summary

In complex cases, the address optimization for gathers and scatters introduced by https://reviews.llvm.org/D76681 would push out instructions not to the vector loop preheader, but to other locations as well. This could lead to their order being scrambled and thus the compilation as a whole failing.
This patch fixes this by ensuring that said instructions are always pushed to the end of the vector loop preheader, and adds a test that would fail without the patch.

Diff Detail

Event Timeline

anwel created this revision.Apr 16 2020, 5:34 AM
dmgreen accepted this revision.Apr 16 2020, 7:05 AM

LGTM

This revision is now accepted and ready to land.Apr 16 2020, 7:05 AM
This revision was automatically updated to reflect the committed changes.