diff options
author | Chris Lattner <sabre@nondot.org> | 2006-03-20 05:40:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-03-20 05:40:45 +0000 |
commit | fa818d0b8bbaadac9834697e95a1652f1acae376 (patch) | |
tree | 7a5624523d273a99b70db2362e4ce0ad0b73d380 | |
parent | 697f88456ce41ca425eaf7f882cc910bbac3100b (diff) |
add vector_shuffle
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26891 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/Target/TargetSelectionDAG.td | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/Target/TargetSelectionDAG.td b/lib/Target/TargetSelectionDAG.td index 24ac3f6f30..c23684fee6 100644 --- a/lib/Target/TargetSelectionDAG.td +++ b/lib/Target/TargetSelectionDAG.td @@ -51,6 +51,15 @@ class SDTCisOpSmallerThanOp<int SmallOp, int BigOp> : SDTypeConstraint<SmallOp>{ int BigOperandNum = BigOp; } +/// SDTCisIntVectorOfSameSize - This indicates that ThisOp and OtherOp are +/// packed 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; +} + //===----------------------------------------------------------------------===// // Selection DAG Type Profile definitions. // @@ -161,6 +170,10 @@ def SDTTruncStore : SDTypeProfile<0, 4, [ // truncstore SDTCisPtrTy<1>, SDTCisVT<2, OtherVT>, SDTCisVT<3, OtherVT> ]>; +def SDTVecShuffle : SDTypeProfile<1, 3, [ + SDTCisSameAs<0, 1>, SDTCisSameAs<1, 2>, SDTCisIntVectorOfSameSize<3, 0> +]>; + //===----------------------------------------------------------------------===// // Selection DAG Node Properties. // @@ -293,6 +306,9 @@ def zextld : SDNode<"ISD::ZEXTLOAD" , SDTIntExtLoad, [SDNPHasChain]>; def extld : SDNode<"ISD::EXTLOAD" , SDTExtLoad, [SDNPHasChain]>; def truncst : SDNode<"ISD::TRUNCSTORE" , SDTTruncStore, [SDNPHasChain]>; +def vector_shuffle : SDNode<"ISD::VECTOR_SHUFFLE", SDTVecShuffle, []>; + + //===----------------------------------------------------------------------===// // Selection DAG Condition Codes |