diff options
Diffstat (limited to 'llvm/lib/Target/X86/X86ISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/X86/X86ISelLowering.cpp | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp index 88456e07d4f..8c39ae47f31 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.cpp +++ b/llvm/lib/Target/X86/X86ISelLowering.cpp @@ -4809,52 +4809,6 @@ static bool canWidenShuffleElements(ArrayRef<int> Mask, return true; } -static unsigned getExtractVEXTRACTImmediate(SDNode *N, unsigned vecWidth) { - assert((vecWidth == 128 || vecWidth == 256) && "Unsupported vector width"); - assert(isa<ConstantSDNode>(N->getOperand(1).getNode()) && - "Illegal extract subvector for VEXTRACT"); - - uint64_t Index = N->getConstantOperandVal(1); - MVT VecVT = N->getOperand(0).getSimpleValueType(); - unsigned NumElemsPerChunk = vecWidth / VecVT.getScalarSizeInBits(); - return Index / NumElemsPerChunk; -} - -static unsigned getInsertVINSERTImmediate(SDNode *N, unsigned vecWidth) { - assert((vecWidth == 128 || vecWidth == 256) && "Unsupported vector width"); - assert(isa<ConstantSDNode>(N->getOperand(2).getNode()) && - "Illegal insert subvector for VINSERT"); - - uint64_t Index = N->getConstantOperandVal(2); - MVT VecVT = N->getSimpleValueType(0); - unsigned NumElemsPerChunk = vecWidth / VecVT.getScalarSizeInBits(); - return Index / NumElemsPerChunk; -} - -/// Return the appropriate immediate to extract the specified -/// EXTRACT_SUBVECTOR index with VEXTRACTF128 and VINSERTI128 instructions. -unsigned X86::getExtractVEXTRACT128Immediate(SDNode *N) { - return getExtractVEXTRACTImmediate(N, 128); -} - -/// Return the appropriate immediate to extract the specified -/// EXTRACT_SUBVECTOR index with VEXTRACTF64x4 and VINSERTI64x4 instructions. -unsigned X86::getExtractVEXTRACT256Immediate(SDNode *N) { - return getExtractVEXTRACTImmediate(N, 256); -} - -/// Return the appropriate immediate to insert at the specified -/// INSERT_SUBVECTOR index with VINSERTF128 and VINSERTI128 instructions. -unsigned X86::getInsertVINSERT128Immediate(SDNode *N) { - return getInsertVINSERTImmediate(N, 128); -} - -/// Return the appropriate immediate to insert at the specified -/// INSERT_SUBVECTOR index with VINSERTF46x4 and VINSERTI64x4 instructions. -unsigned X86::getInsertVINSERT256Immediate(SDNode *N) { - return getInsertVINSERTImmediate(N, 256); -} - /// Returns true if Elt is a constant zero or a floating point constant +0.0. bool X86::isZeroNode(SDValue Elt) { return isNullConstant(Elt) || isNullFPConstant(Elt); |