This is an archive of the discontinued LLVM Phabricator instance.

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

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



In complex cases, the address optimization for gathers and scatters introduced by 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


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.