From c313c66a88a19f6cb59f8c349fe86eb69ee68b5f Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 20 Apr 2006 08:54:13 +0000 Subject: [PATCH] Added a virtual method isVectorClearMaskLegal to TLI. It is similar to isShuffleMaskLegal, used to determine if it makes sense to turn a "vector clear" (e.g. pand V, <0, -1, 0, -1> to a shuffle of the vector and a zero vector. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27873 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetLowering.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 882584f313b..0a3fb03eced 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -200,6 +200,16 @@ public: return true; } + /// isVectorClearMaskLegal - Similar to isShuffleMaskLegal. This is + /// used by Targets can use this to indicate if there is a suitable + /// VECTOR_SHUFFLE that can be used to replace a VAND with a constant + /// pool entry. + virtual bool isVectorClearMaskLegal(std::vector &BVOps, + MVT::ValueType EVT, + SelectionDAG &DAG) const { + return false; + } + /// getOperationAction - Return how this operation should be treated: either /// it is legal, needs to be promoted to a larger size, needs to be /// expanded to some other code sequence, or the target has a custom expander