forked from OSchip/llvm-project
[X86] Renamed lowerVectorShuffleAsUnpack NFCI.
Renamed to lowerVectorShuffleAsPermuteAndUnpack to make it clear that it lowers to more than just a UNPCK instruction. llvm-svn: 247513
This commit is contained in:
parent
737e7d68bc
commit
5253b7b4a7
|
@ -7867,8 +7867,9 @@ static SDValue lowerVectorShuffleAsInsertPS(SDValue Op, SDValue V1, SDValue V2,
|
||||||
/// because for floating point vectors we have a generalized SHUFPS lowering
|
/// because for floating point vectors we have a generalized SHUFPS lowering
|
||||||
/// strategy that handles everything that doesn't *exactly* match an unpack,
|
/// strategy that handles everything that doesn't *exactly* match an unpack,
|
||||||
/// making this clever lowering unnecessary.
|
/// making this clever lowering unnecessary.
|
||||||
static SDValue lowerVectorShuffleAsUnpack(SDLoc DL, MVT VT, SDValue V1,
|
static SDValue lowerVectorShuffleAsPermuteAndUnpack(SDLoc DL, MVT VT,
|
||||||
SDValue V2, ArrayRef<int> Mask,
|
SDValue V1, SDValue V2,
|
||||||
|
ArrayRef<int> Mask,
|
||||||
SelectionDAG &DAG) {
|
SelectionDAG &DAG) {
|
||||||
assert(!VT.isFloatingPoint() &&
|
assert(!VT.isFloatingPoint() &&
|
||||||
"This routine only supports integer vectors.");
|
"This routine only supports integer vectors.");
|
||||||
|
@ -8456,8 +8457,8 @@ static SDValue lowerV4I32VectorShuffle(SDValue Op, SDValue V1, SDValue V2,
|
||||||
Mask, DAG);
|
Mask, DAG);
|
||||||
|
|
||||||
// Try to lower by permuting the inputs into an unpack instruction.
|
// Try to lower by permuting the inputs into an unpack instruction.
|
||||||
if (SDValue Unpack =
|
if (SDValue Unpack = lowerVectorShuffleAsPermuteAndUnpack(DL, MVT::v4i32, V1,
|
||||||
lowerVectorShuffleAsUnpack(DL, MVT::v4i32, V1, V2, Mask, DAG))
|
V2, Mask, DAG))
|
||||||
return Unpack;
|
return Unpack;
|
||||||
|
|
||||||
// We implement this with SHUFPS because it can blend from two vectors.
|
// We implement this with SHUFPS because it can blend from two vectors.
|
||||||
|
@ -9085,8 +9086,8 @@ static SDValue lowerV8I16VectorShuffle(SDValue Op, SDValue V1, SDValue V2,
|
||||||
lowerVectorShuffleAsBitBlend(DL, MVT::v8i16, V1, V2, Mask, DAG))
|
lowerVectorShuffleAsBitBlend(DL, MVT::v8i16, V1, V2, Mask, DAG))
|
||||||
return BitBlend;
|
return BitBlend;
|
||||||
|
|
||||||
if (SDValue Unpack =
|
if (SDValue Unpack = lowerVectorShuffleAsPermuteAndUnpack(DL, MVT::v8i16, V1,
|
||||||
lowerVectorShuffleAsUnpack(DL, MVT::v8i16, V1, V2, Mask, DAG))
|
V2, Mask, DAG))
|
||||||
return Unpack;
|
return Unpack;
|
||||||
|
|
||||||
// If we can't directly blend but can use PSHUFB, that will be better as it
|
// If we can't directly blend but can use PSHUFB, that will be better as it
|
||||||
|
@ -9363,8 +9364,8 @@ static SDValue lowerV16I8VectorShuffle(SDValue Op, SDValue V1, SDValue V2,
|
||||||
// FIXME: It might be worth trying to detect if the unpack-feeding
|
// FIXME: It might be worth trying to detect if the unpack-feeding
|
||||||
// shuffles will both be pshufb, in which case we shouldn't bother with
|
// shuffles will both be pshufb, in which case we shouldn't bother with
|
||||||
// this.
|
// this.
|
||||||
if (SDValue Unpack =
|
if (SDValue Unpack = lowerVectorShuffleAsPermuteAndUnpack(
|
||||||
lowerVectorShuffleAsUnpack(DL, MVT::v16i8, V1, V2, Mask, DAG))
|
DL, MVT::v16i8, V1, V2, Mask, DAG))
|
||||||
return Unpack;
|
return Unpack;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue