This is an archive of the discontinued LLVM Phabricator instance.

[ARM][MVE] Restrict allowed types of gather/scatter offsets
ClosedPublic

Authored by anwel on Feb 28 2020, 9:02 AM.

Details

Summary

The MVE gather instructions smaller than 32bits zext extend the values in the offset register, as opposed to sign extending them.
They are thus not able to replace an implicit sext that the getelementptr instruction would use to extend the elements of the vector to full pointer (i.e., i32) size.
We need to make sure that the code that we select from is suitably extended, which this patch attempts to fix by tightening up the offset checks.

Diff Detail

Event Timeline

anwel created this revision.Feb 28 2020, 9:02 AM
dmgreen accepted this revision.Mar 1 2020, 7:07 AM

LGTM

This revision is now accepted and ready to land.Mar 1 2020, 7:07 AM
This revision was automatically updated to reflect the committed changes.