This is an archive of the discontinued LLVM Phabricator instance.

[mips][msa] Accept more values for constant splats
ClosedPublic

Authored by sdardis on Mar 6 2017, 3:55 AM.

Details

Summary

This patches teaches the MIPS backend to accept more values for constant
splats. Previously, only 10 bit signed immediates or values that could be
loaded using an ldi.[bhwd] instruction would be acceptted. This patch relaxes
that constraint so that any constant value that be splatted is accepted.

As a result, the constant pool is used less for vector operations, and the
suite of bit manipulation instructions b(clr|set|neg)i can now be used with
the full range of their immediate operand.

Event Timeline

sdardis created this revision.Mar 6 2017, 3:55 AM
slthakur accepted this revision.Mar 7 2017, 6:57 AM

LGTM

This revision is now accepted and ready to land.Mar 7 2017, 6:57 AM
sdardis closed this revision.Mar 10 2017, 4:55 AM

Thanks for the review. rL297372.

I attributed the wrong commit in my last comment. It should be rL297457.