forked from OSchip/llvm-project
[X86][SSE] Rename target shuffle unary permute matching function. NFCI.
In preparation for adding a binary permute matching function. llvm-svn: 277737
This commit is contained in:
parent
bf82f44e7b
commit
3dbce52c16
|
@ -24841,10 +24841,10 @@ static bool matchUnaryVectorShuffle(MVT SrcVT, ArrayRef<int> Mask,
|
||||||
// Attempt to match a combined shuffle mask against supported unary immediate
|
// Attempt to match a combined shuffle mask against supported unary immediate
|
||||||
// permute instructions.
|
// permute instructions.
|
||||||
// TODO: Investigate sharing more of this with shuffle lowering.
|
// TODO: Investigate sharing more of this with shuffle lowering.
|
||||||
static bool matchPermuteVectorShuffle(MVT SrcVT, ArrayRef<int> Mask,
|
static bool matchUnaryPermuteVectorShuffle(MVT SrcVT, ArrayRef<int> Mask,
|
||||||
const X86Subtarget &Subtarget,
|
const X86Subtarget &Subtarget,
|
||||||
unsigned &Shuffle, MVT &ShuffleVT,
|
unsigned &Shuffle, MVT &ShuffleVT,
|
||||||
unsigned &PermuteImm) {
|
unsigned &PermuteImm) {
|
||||||
// Ensure we don't contain any zero elements.
|
// Ensure we don't contain any zero elements.
|
||||||
for (int M : Mask) {
|
for (int M : Mask) {
|
||||||
if (M == SM_SentinelZero)
|
if (M == SM_SentinelZero)
|
||||||
|
@ -25116,8 +25116,8 @@ static bool combineX86ShuffleChain(SDValue Input, SDValue Root,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (matchPermuteVectorShuffle(VT, Mask, Subtarget, Shuffle, ShuffleVT,
|
if (matchUnaryPermuteVectorShuffle(VT, Mask, Subtarget, Shuffle, ShuffleVT,
|
||||||
PermuteImm)) {
|
PermuteImm)) {
|
||||||
if (Depth == 1 && Root.getOpcode() == Shuffle)
|
if (Depth == 1 && Root.getOpcode() == Shuffle)
|
||||||
return false; // Nothing to do!
|
return false; // Nothing to do!
|
||||||
Res = DAG.getBitcast(ShuffleVT, Input);
|
Res = DAG.getBitcast(ShuffleVT, Input);
|
||||||
|
|
Loading…
Reference in New Issue