Target shuffle combining now supports the matching of INSERT_VECTOR_ELT/PINSRW/PINSRB for merging multiple insertions into shuffles/bitmasks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@305788
91177308-0d34-0410-b5e6-
96231b3b80d8
// If we are inserting a element, see if we can do this more efficiently with
// a blend shuffle with a rematerializable vector than a costly integer
// insertion.
- // TODO: pre-SSE41 targets will tend to use bit masking - this could still
- // be beneficial if we are inserting several zeros and can combine the masks.
if ((IsZeroElt || IsAllOnesElt) && Subtarget.hasSSE41() && NumElts <= 8) {
SmallVector<int, 8> BlendMask;
for (unsigned i = 0; i != NumElts; ++i)