This is an archive of the discontinued LLVM Phabricator instance.

[mips][msa] Fix msa_[st/ld] offset check
ClosedPublic

Authored by abeserminji on Nov 2 2018, 10:10 AM.

Details

Summary

When msa_[st/ld]_[b/h/w/d] is called with constexpr as an offset argument,
it can be checked in compile time if it is a valid offset. The offset has to be
a multiple of an element size.
E.g. msa_st_h(p, 5) is not valid, because 5 is not a multiple of 2,
while msa_ld_w(p, 12) is valid, because 12 is a multiple of 4.

Depends on D53984.

Diff Detail

Repository
rC Clang

Event Timeline

abeserminji created this revision.Nov 2 2018, 10:10 AM
This revision is now accepted and ready to land.Nov 6 2018, 7:59 AM
This revision was automatically updated to reflect the committed changes.