The same code appears earlier in the function. This represents an earlier version of what became r313373 that I still had sitting in my local repo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313465
91177308-0d34-0410-b5e6-
96231b3b80d8
// If either input operand is a zero vector, use VPERM2X128 because its mask
// allows us to replace the zero input with an implicit zero.
if (!IsV1Zero && !IsV2Zero) {
- // With AVX2, use VPERMQ/VPERMPD to allow memory folding.
- if (Subtarget.hasAVX2() && V2.isUndef())
- return SDValue();
-
// Check for patterns which can be matched with a single insert of a 128-bit
// subvector.
bool OnlyUsesV1 = isShuffleEquivalent(V1, V2, Mask, {0, 1, 0, 1});