forked from OSchip/llvm-project
Remove some remants of the old palign pattern fragment that were still hanging around. Also remove a cast from inside getShuffleVPERM2X128Immediate and getShuffleVPERMILPImmediate since the only caller already had done the cast.
llvm-svn: 146344
This commit is contained in:
parent
7c96b7db96
commit
1fdfec63a4
|
@ -3687,8 +3687,7 @@ static bool isVPERM2X128Mask(const SmallVectorImpl<int> &Mask, EVT VT,
|
||||||
|
|
||||||
/// getShuffleVPERM2X128Immediate - Return the appropriate immediate to shuffle
|
/// getShuffleVPERM2X128Immediate - Return the appropriate immediate to shuffle
|
||||||
/// the specified VECTOR_MASK mask with VPERM2F128/VPERM2I128 instructions.
|
/// the specified VECTOR_MASK mask with VPERM2F128/VPERM2I128 instructions.
|
||||||
static unsigned getShuffleVPERM2X128Immediate(SDNode *N) {
|
static unsigned getShuffleVPERM2X128Immediate(ShuffleVectorSDNode *SVOp) {
|
||||||
ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(N);
|
|
||||||
EVT VT = SVOp->getValueType(0);
|
EVT VT = SVOp->getValueType(0);
|
||||||
|
|
||||||
int HalfSize = VT.getVectorNumElements()/2;
|
int HalfSize = VT.getVectorNumElements()/2;
|
||||||
|
@ -3750,8 +3749,7 @@ static bool isVPERMILPMask(const SmallVectorImpl<int> &Mask, EVT VT,
|
||||||
|
|
||||||
/// getShuffleVPERMILPImmediate - Return the appropriate immediate to shuffle
|
/// getShuffleVPERMILPImmediate - Return the appropriate immediate to shuffle
|
||||||
/// the specified VECTOR_MASK mask with VPERMILPS/D* instructions.
|
/// the specified VECTOR_MASK mask with VPERMILPS/D* instructions.
|
||||||
static unsigned getShuffleVPERMILPImmediate(SDNode *N) {
|
static unsigned getShuffleVPERMILPImmediate(ShuffleVectorSDNode *SVOp) {
|
||||||
ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(N);
|
|
||||||
EVT VT = SVOp->getValueType(0);
|
EVT VT = SVOp->getValueType(0);
|
||||||
|
|
||||||
int NumElts = VT.getVectorNumElements();
|
int NumElts = VT.getVectorNumElements();
|
||||||
|
@ -3991,14 +3989,13 @@ unsigned X86::getShufflePSHUFLWImmediate(SDNode *N) {
|
||||||
|
|
||||||
/// getShufflePALIGNRImmediate - Return the appropriate immediate to shuffle
|
/// getShufflePALIGNRImmediate - Return the appropriate immediate to shuffle
|
||||||
/// the specified VECTOR_SHUFFLE mask with the PALIGNR instruction.
|
/// the specified VECTOR_SHUFFLE mask with the PALIGNR instruction.
|
||||||
unsigned X86::getShufflePALIGNRImmediate(SDNode *N) {
|
static unsigned getShufflePALIGNRImmediate(ShuffleVectorSDNode *SVOp) {
|
||||||
ShuffleVectorSDNode *SVOp = cast<ShuffleVectorSDNode>(N);
|
EVT VT = SVOp->getValueType(0);
|
||||||
EVT VVT = N->getValueType(0);
|
unsigned EltSize = VT.getVectorElementType().getSizeInBits() >> 3;
|
||||||
unsigned EltSize = VVT.getVectorElementType().getSizeInBits() >> 3;
|
|
||||||
int Val = 0;
|
int Val = 0;
|
||||||
|
|
||||||
unsigned i, e;
|
unsigned i, e;
|
||||||
for (i = 0, e = VVT.getVectorNumElements(); i != e; ++i) {
|
for (i = 0, e = VT.getVectorNumElements(); i != e; ++i) {
|
||||||
Val = SVOp->getMaskElt(i);
|
Val = SVOp->getMaskElt(i);
|
||||||
if (Val >= 0)
|
if (Val >= 0)
|
||||||
break;
|
break;
|
||||||
|
@ -6631,7 +6628,7 @@ X86TargetLowering::LowerVECTOR_SHUFFLE(SDValue Op, SelectionDAG &DAG) const {
|
||||||
|
|
||||||
if (isPALIGNRMask(M, VT, Subtarget->hasSSSE3orAVX()))
|
if (isPALIGNRMask(M, VT, Subtarget->hasSSSE3orAVX()))
|
||||||
return getTargetShuffleNode(X86ISD::PALIGN, dl, VT, V1, V2,
|
return getTargetShuffleNode(X86ISD::PALIGN, dl, VT, V1, V2,
|
||||||
X86::getShufflePALIGNRImmediate(SVOp),
|
getShufflePALIGNRImmediate(SVOp),
|
||||||
DAG);
|
DAG);
|
||||||
|
|
||||||
if (ShuffleVectorSDNode::isSplatMask(&M[0], VT) &&
|
if (ShuffleVectorSDNode::isSplatMask(&M[0], VT) &&
|
||||||
|
|
|
@ -455,10 +455,6 @@ namespace llvm {
|
||||||
/// the specified VECTOR_SHUFFLE mask with PSHUFLW instruction.
|
/// the specified VECTOR_SHUFFLE mask with PSHUFLW instruction.
|
||||||
unsigned getShufflePSHUFLWImmediate(SDNode *N);
|
unsigned getShufflePSHUFLWImmediate(SDNode *N);
|
||||||
|
|
||||||
/// getShufflePALIGNRImmediate - Return the appropriate immediate to shuffle
|
|
||||||
/// the specified VECTOR_SHUFFLE mask with the PALIGNR instruction.
|
|
||||||
unsigned getShufflePALIGNRImmediate(SDNode *N);
|
|
||||||
|
|
||||||
/// getExtractVEXTRACTF128Immediate - Return the appropriate
|
/// getExtractVEXTRACTF128Immediate - Return the appropriate
|
||||||
/// immediate to extract the specified EXTRACT_SUBVECTOR index
|
/// immediate to extract the specified EXTRACT_SUBVECTOR index
|
||||||
/// with VEXTRACTF128 instructions.
|
/// with VEXTRACTF128 instructions.
|
||||||
|
|
|
@ -347,12 +347,6 @@ def SHUFFLE_get_pshuflw_imm : SDNodeXForm<vector_shuffle, [{
|
||||||
return getI8Imm(X86::getShufflePSHUFLWImmediate(N));
|
return getI8Imm(X86::getShufflePSHUFLWImmediate(N));
|
||||||
}]>;
|
}]>;
|
||||||
|
|
||||||
// SHUFFLE_get_palign_imm xform function: convert vector_shuffle mask to
|
|
||||||
// a PALIGNR imm.
|
|
||||||
def SHUFFLE_get_palign_imm : SDNodeXForm<vector_shuffle, [{
|
|
||||||
return getI8Imm(X86::getShufflePALIGNRImmediate(N));
|
|
||||||
}]>;
|
|
||||||
|
|
||||||
// EXTRACT_get_vextractf128_imm xform function: convert extract_subvector index
|
// EXTRACT_get_vextractf128_imm xform function: convert extract_subvector index
|
||||||
// to VEXTRACTF128 imm.
|
// to VEXTRACTF128 imm.
|
||||||
def EXTRACT_get_vextractf128_imm : SDNodeXForm<extract_subvector, [{
|
def EXTRACT_get_vextractf128_imm : SDNodeXForm<extract_subvector, [{
|
||||||
|
|
Loading…
Reference in New Issue