]> granicus.if.org Git - llvm/commit
[mips][msa] Accept more values for constant splats
authorSimon Dardis <simon.dardis@imgtec.com>
Fri, 10 Mar 2017 13:27:14 +0000 (13:27 +0000)
committerSimon Dardis <simon.dardis@imgtec.com>
Fri, 10 Mar 2017 13:27:14 +0000 (13:27 +0000)
commit56582e5d88cf1bf90ec1b2df1e97e1850af25e44
tree350cb299873848135c52379ca3034f2fd51fa32d
parenta4a753ce0bc7140480212238f271531ca4f2dcfc
[mips][msa] Accept more values for constant splats

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.

Reviewers: slthakur

Differential Revision: https://reviews.llvm.org/D30640

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@297457 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/Mips/MipsSEISelDAGToDAG.cpp
lib/Target/Mips/MipsSEISelLowering.cpp
test/CodeGen/Mips/msa/basic_operations.ll
test/CodeGen/Mips/msa/immediates.ll