summaryrefslogtreecommitdiff
path: root/include/llvm/Target/TargetSelectionDAG.td
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2011-01-25 16:16:32 +0000
committerDavid Greene <greened@obbligato.org>2011-01-25 16:16:32 +0000
commitb5b80a93f611ee63788b10d89989b3644642cba5 (patch)
treebcc2381040c4c0dba575497589b718607d4e002e /include/llvm/Target/TargetSelectionDAG.td
parent227fba11ca168225d913d1cea94a05b883092e76 (diff)
downloadllvm-b5b80a93f611ee63788b10d89989b3644642cba5.tar.gz
llvm-b5b80a93f611ee63788b10d89989b3644642cba5.tar.bz2
llvm-b5b80a93f611ee63788b10d89989b3644642cba5.tar.xz
[AVX] Add TableGen classes for vector/subvector type constraints.
This will be used to check patterns referencing a forthcoming INSERT_SUBVECTOR SDNode and will also be used to check EXTRACT_SUBVECTOR nodes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124191 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetSelectionDAG.td')
-rw-r--r--include/llvm/Target/TargetSelectionDAG.td14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetSelectionDAG.td b/include/llvm/Target/TargetSelectionDAG.td
index 37ebc12e5b..7119e013a7 100644
--- a/include/llvm/Target/TargetSelectionDAG.td
+++ b/include/llvm/Target/TargetSelectionDAG.td
@@ -61,6 +61,13 @@ class SDTCisEltOfVec<int ThisOp, int OtherOp>
int OtherOpNum = OtherOp;
}
+/// SDTCisSubVecOfVec - This indicates that ThisOp is a vector type
+/// with length less that of OtherOp, which is a vector type.
+class SDTCisSubVecOfVec<int ThisOp, int OtherOp>
+ : SDTypeConstraint<ThisOp> {
+ int OtherOpNum = OtherOp;
+}
+
//===----------------------------------------------------------------------===//
// Selection DAG Type Profile definitions.
//
@@ -183,6 +190,13 @@ def SDTVecInsert : SDTypeProfile<1, 3, [ // vector insert
SDTCisEltOfVec<2, 1>, SDTCisSameAs<0, 1>, SDTCisPtrTy<3>
]>;
+def SDTSubVecExtract : SDTypeProfile<1, 1, [// subvector extract
+ SDTCisSubVecOfVec<0,1>
+]>;
+def SDTSubVecInsert : SDTypeProfile<1, 2, [ // subvector insert
+ SDTCisSubVecOfVec<2, 1>, SDTCisSameAs<0,1>
+]>;
+
def SDTPrefetch : SDTypeProfile<0, 3, [ // prefetch
SDTCisPtrTy<0>, SDTCisSameAs<1, 2>, SDTCisInt<1>
]>;