This fills in the remaining shift operations that take a single vector
input and an immediate shift count: the vqshl, vqshlu, vrshr and
vshll[bt] families.
vshll[bt] (which shifts each input lane left into a double-width
output lane) is the most interesting one. There are separate MC
instruction ids for shifting by exactly the input lane width and
shifting by less than that, because the instruction encoding is so
completely different for the lane-width special case. So I had to
write two sets of patterns to match based on the immediate shift
count, which involved adding a ComplexPattern matcher to avoid the
general-case pattern accidentally matching the special case too. For
that family I've made sure to add an llc codegen test for both
versions of each instruction.
I'm experimenting with a new strategy for parametrising the isel
patterns for all these instructions: adding extra fields to the
relevant Instruction subclass itself, which are ignored by the
Tablegen backends that generate the MC data, but can be retrieved from
each instance of that instruction subclass when it's passed as a
template parameter to the multiclass that generates its isel patterns.
A nice effect of that is that I can fill in those informational fields
using let blocks, rather than having to type them out once per
instruction at defm time.
(As a result, quite a lot of existing instruction defs are
reindented by this patch, so it's clearer to read with whitespace
changes ignored.)
*OUCH* 6 deep :-)