From 589247989417726f2c8b50a0648318be239f1602 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Mon, 20 Mar 2006 05:40:45 +0000 Subject: [PATCH] add vector_shuffle llvm-svn: 26891 --- lib/Target/TargetSelectionDAG.td | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/Target/TargetSelectionDAG.td b/lib/Target/TargetSelectionDAG.td index 24ac3f6f30b..c23684fee64 100644 --- a/lib/Target/TargetSelectionDAG.td +++ b/lib/Target/TargetSelectionDAG.td @@ -51,6 +51,15 @@ class SDTCisOpSmallerThanOp : SDTypeConstraint{ 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 + : SDTypeConstraint { + 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