summaryrefslogtreecommitdiff
path: root/utils/TableGen/CodeGenDAGPatterns.h
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2009-08-12 22:30:59 +0000
committerBob Wilson <bob.wilson@apple.com>2009-08-12 22:30:59 +0000
commit36e3e668be0c4914660575d7cea800b0d51a4116 (patch)
tree862ddfc10790f87566af81a841be00a951ed0fe8 /utils/TableGen/CodeGenDAGPatterns.h
parenta9ad04191cb56c42944b17980b8b2bb2afe11ab2 (diff)
downloadllvm-36e3e668be0c4914660575d7cea800b0d51a4116.tar.gz
llvm-36e3e668be0c4914660575d7cea800b0d51a4116.tar.bz2
llvm-36e3e668be0c4914660575d7cea800b0d51a4116.tar.xz
Add a new "SDTCisVec" SDTypeConstraint. This complements the vAny type.
There have been a few times where I've wanted this but ended up leaving the operand type unconstrained. It is easy to add this now and should help catch errors in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78849 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenDAGPatterns.h')
-rw-r--r--utils/TableGen/CodeGenDAGPatterns.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.h b/utils/TableGen/CodeGenDAGPatterns.h
index 7c2791d440..56dcfcff91 100644
--- a/utils/TableGen/CodeGenDAGPatterns.h
+++ b/utils/TableGen/CodeGenDAGPatterns.h
@@ -39,16 +39,21 @@ namespace EEVT {
enum DAGISelGenValueType {
isFP = MVT::LAST_VALUETYPE,
isInt,
+ isVec,
isUnknown
};
- /// isExtIntegerVT - Return true if the specified extended value type vector
- /// contains isInt or an integer value type.
+ /// isExtIntegerInVTs - Return true if the specified extended value type
+ /// vector contains isInt or an integer value type.
bool isExtIntegerInVTs(const std::vector<unsigned char> &EVTs);
- /// isExtFloatingPointVT - Return true if the specified extended value type
- /// vector contains isFP or a FP value type.
+ /// isExtFloatingPointInVTs - Return true if the specified extended value
+ /// type vector contains isFP or a FP value type.
bool isExtFloatingPointInVTs(const std::vector<unsigned char> &EVTs);
+
+ /// isExtVectorinVTs - Return true if the specified extended value type
+ /// vector contains isVec or a vector value type.
+ bool isExtVectorInVTs(const std::vector<unsigned char> &EVTs);
}
/// Set type used to track multiply used variables in patterns
@@ -61,7 +66,7 @@ struct SDTypeConstraint {
unsigned OperandNo; // The operand # this constraint applies to.
enum {
- SDTCisVT, SDTCisPtrTy, SDTCisInt, SDTCisFP, SDTCisSameAs,
+ SDTCisVT, SDTCisPtrTy, SDTCisInt, SDTCisFP, SDTCisVec, SDTCisSameAs,
SDTCisVTSmallerThanOp, SDTCisOpSmallerThanOp, SDTCisEltOfVec
} ConstraintType;