mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 04:30:23 +00:00
Use MVT instead of EVT when computing shuffle immediates since they can only be for legal types. Keeps compiler from generating unneeded checks and handling for extended types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172893 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
90230c8466
commit
cfcab21e4d
@ -3837,7 +3837,7 @@ static bool isVPERM2X128Mask(ArrayRef<int> Mask, EVT VT, bool HasFp256) {
|
||||
/// getShuffleVPERM2X128Immediate - Return the appropriate immediate to shuffle
|
||||
/// the specified VECTOR_MASK mask with VPERM2F128/VPERM2I128 instructions.
|
||||
static unsigned getShuffleVPERM2X128Immediate(ShuffleVectorSDNode *SVOp) {
|
||||
EVT VT = SVOp->getValueType(0);
|
||||
MVT VT = SVOp->getValueType(0).getSimpleVT();
|
||||
|
||||
unsigned HalfSize = VT.getVectorNumElements()/2;
|
||||
|
||||
@ -4040,7 +4040,7 @@ bool X86::isVINSERTF128Index(SDNode *N) {
|
||||
/// the specified VECTOR_SHUFFLE mask with PSHUF* and SHUFP* instructions.
|
||||
/// Handles 128-bit and 256-bit.
|
||||
static unsigned getShuffleSHUFImmediate(ShuffleVectorSDNode *N) {
|
||||
EVT VT = N->getValueType(0);
|
||||
MVT VT = N->getValueType(0).getSimpleVT();
|
||||
|
||||
assert((VT.is128BitVector() || VT.is256BitVector()) &&
|
||||
"Unsupported vector type for PSHUF/SHUFP");
|
||||
@ -4070,7 +4070,7 @@ static unsigned getShuffleSHUFImmediate(ShuffleVectorSDNode *N) {
|
||||
/// getShufflePSHUFHWImmediate - Return the appropriate immediate to shuffle
|
||||
/// the specified VECTOR_SHUFFLE mask with the PSHUFHW instruction.
|
||||
static unsigned getShufflePSHUFHWImmediate(ShuffleVectorSDNode *N) {
|
||||
EVT VT = N->getValueType(0);
|
||||
MVT VT = N->getValueType(0).getSimpleVT();
|
||||
|
||||
assert((VT == MVT::v8i16 || VT == MVT::v16i16) &&
|
||||
"Unsupported vector type for PSHUFHW");
|
||||
@ -4094,7 +4094,7 @@ static unsigned getShufflePSHUFHWImmediate(ShuffleVectorSDNode *N) {
|
||||
/// getShufflePSHUFLWImmediate - Return the appropriate immediate to shuffle
|
||||
/// the specified VECTOR_SHUFFLE mask with the PSHUFLW instruction.
|
||||
static unsigned getShufflePSHUFLWImmediate(ShuffleVectorSDNode *N) {
|
||||
EVT VT = N->getValueType(0);
|
||||
MVT VT = N->getValueType(0).getSimpleVT();
|
||||
|
||||
assert((VT == MVT::v8i16 || VT == MVT::v16i16) &&
|
||||
"Unsupported vector type for PSHUFHW");
|
||||
@ -4118,7 +4118,7 @@ static unsigned getShufflePSHUFLWImmediate(ShuffleVectorSDNode *N) {
|
||||
/// getShufflePALIGNRImmediate - Return the appropriate immediate to shuffle
|
||||
/// the specified VECTOR_SHUFFLE mask with the PALIGNR instruction.
|
||||
static unsigned getShufflePALIGNRImmediate(ShuffleVectorSDNode *SVOp) {
|
||||
EVT VT = SVOp->getValueType(0);
|
||||
MVT VT = SVOp->getValueType(0).getSimpleVT();
|
||||
unsigned EltSize = VT.getVectorElementType().getSizeInBits() >> 3;
|
||||
|
||||
unsigned NumElts = VT.getVectorNumElements();
|
||||
@ -4149,8 +4149,8 @@ unsigned X86::getExtractVEXTRACTF128Immediate(SDNode *N) {
|
||||
uint64_t Index =
|
||||
cast<ConstantSDNode>(N->getOperand(1).getNode())->getZExtValue();
|
||||
|
||||
EVT VecVT = N->getOperand(0).getValueType();
|
||||
EVT ElVT = VecVT.getVectorElementType();
|
||||
MVT VecVT = N->getOperand(0).getValueType().getSimpleVT();
|
||||
MVT ElVT = VecVT.getVectorElementType();
|
||||
|
||||
unsigned NumElemsPerChunk = 128 / ElVT.getSizeInBits();
|
||||
return Index / NumElemsPerChunk;
|
||||
@ -4166,8 +4166,8 @@ unsigned X86::getInsertVINSERTF128Immediate(SDNode *N) {
|
||||
uint64_t Index =
|
||||
cast<ConstantSDNode>(N->getOperand(2).getNode())->getZExtValue();
|
||||
|
||||
EVT VecVT = N->getValueType(0);
|
||||
EVT ElVT = VecVT.getVectorElementType();
|
||||
MVT VecVT = N->getValueType(0).getSimpleVT();
|
||||
MVT ElVT = VecVT.getVectorElementType();
|
||||
|
||||
unsigned NumElemsPerChunk = 128 / ElVT.getSizeInBits();
|
||||
return Index / NumElemsPerChunk;
|
||||
@ -4177,7 +4177,7 @@ unsigned X86::getInsertVINSERTF128Immediate(SDNode *N) {
|
||||
/// the specified VECTOR_SHUFFLE mask with VPERMQ and VPERMPD instructions.
|
||||
/// Handles 256-bit.
|
||||
static unsigned getShuffleCLImmediate(ShuffleVectorSDNode *N) {
|
||||
EVT VT = N->getValueType(0);
|
||||
MVT VT = N->getValueType(0).getSimpleVT();
|
||||
|
||||
unsigned NumElts = VT.getVectorNumElements();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user