mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
2nd attempt, fixing SSE4.1 issues and implementing feedback from duncan.
PR2957 ISD::VECTOR_SHUFFLE now stores an array of integers representing the shuffle mask internal to the node, rather than taking a BUILD_VECTOR of ConstantSDNodes as the shuffle mask. A value of -1 represents UNDEF. In addition to eliminating the creation of illegal BUILD_VECTORS just to represent shuffle masks, we are better about canonicalizing the shuffle mask, resulting in substantially better code for some classes of shuffles. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70225 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -51,15 +51,6 @@ class SDTCisOpSmallerThanOp<int SmallOp, int BigOp> : SDTypeConstraint<SmallOp>{
|
||||
int BigOperandNum = BigOp;
|
||||
}
|
||||
|
||||
/// SDTCisIntVectorOfSameSize - This indicates that ThisOp and OtherOp are
|
||||
/// vector types, and that ThisOp is the result of
|
||||
/// MVT::getIntVectorWithNumElements with the number of elements
|
||||
/// that ThisOp has.
|
||||
class SDTCisIntVectorOfSameSize<int ThisOp, int OtherOp>
|
||||
: SDTypeConstraint<ThisOp> {
|
||||
int OtherOpNum = OtherOp;
|
||||
}
|
||||
|
||||
/// SDTCisEltOfVec - This indicates that ThisOp is a scalar type of the same
|
||||
/// type as the element type of OtherOp, which is a vector type.
|
||||
class SDTCisEltOfVec<int ThisOp, int OtherOp>
|
||||
@@ -175,8 +166,8 @@ def SDTIStore : SDTypeProfile<1, 3, [ // indexed store
|
||||
SDTCisSameAs<0, 2>, SDTCisPtrTy<0>, SDTCisPtrTy<3>
|
||||
]>;
|
||||
|
||||
def SDTVecShuffle : SDTypeProfile<1, 3, [
|
||||
SDTCisSameAs<0, 1>, SDTCisSameAs<1, 2>, SDTCisIntVectorOfSameSize<3, 0>
|
||||
def SDTVecShuffle : SDTypeProfile<1, 2, [
|
||||
SDTCisSameAs<0, 1>, SDTCisSameAs<1, 2>
|
||||
]>;
|
||||
def SDTVecExtract : SDTypeProfile<1, 2, [ // vector extract
|
||||
SDTCisEltOfVec<0, 1>, SDTCisPtrTy<2>
|
||||
|
Reference in New Issue
Block a user