summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2015-03-05 07:11:34 +0000
committerCraig Topper <craig.topper@gmail.com>2015-03-05 07:11:34 +0000
commit8ad519fd3c5998d977d4f63bc9fc9ec5a95580b6 (patch)
tree083605bfd9dd3bc4807749730dbd8a47ccb27924 /include
parent62eaac608745d9012d03dae20af97855f1903a9a (diff)
downloadllvm-8ad519fd3c5998d977d4f63bc9fc9ec5a95580b6.tar.gz
[TableGen] Add support constraining a vector type in a pattern to have a specific element type and for constraining a vector type to have the same number of elements as another vector type. This is useful for AVX512 mask operations so we relate the mask type to the type of the other arguments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231356 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Target/TargetSelectionDAG.td12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetSelectionDAG.td b/include/llvm/Target/TargetSelectionDAG.td
index 2ecd900d34bb..5388962fb681 100644
--- a/include/llvm/Target/TargetSelectionDAG.td
+++ b/include/llvm/Target/TargetSelectionDAG.td
@@ -68,6 +68,18 @@ class SDTCisSubVecOfVec<int ThisOp, int OtherOp>
int OtherOpNum = OtherOp;
}
+// SDTCVecEltisVT - The specified operand is vector type with element type
+// of VT.
+class SDTCVecEltisVT<int OpNum, ValueType vt> : SDTypeConstraint<OpNum> {
+ ValueType VT = vt;
+}
+
+// SDTCisSameNumEltsAs - The two specified operands have identical number
+// of elements.
+class SDTCisSameNumEltsAs<int OpNum, int OtherOp> : SDTypeConstraint<OpNum> {
+ int OtherOperandNum = OtherOp;
+}
+
//===----------------------------------------------------------------------===//
// Selection DAG Type Profile definitions.
//