diff --git a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp index 85340e47f2c2..8566aa6ae2f3 100644 --- a/llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp +++ b/llvm/lib/Target/Hexagon/HexagonISelDAGToDAGHVX.cpp @@ -1271,6 +1271,8 @@ OpRef HvxSelector::shuffp2(ShuffleMask SM, OpRef Va, OpRef Vb, return shuffp1(ShuffleMask(PackedMask), P, Results); SmallVector MaskL(VecLen), MaskR(VecLen); + splitMask(SM.Mask, MaskL, MaskR); + OpRef L = shuffp1(ShuffleMask(MaskL), Va, Results); OpRef R = shuffp1(ShuffleMask(MaskR), Vb, Results); if (!L.isValid() || !R.isValid())