Added a virtual method isVectorClearMaskLegal to TLI. It is similar to
authorEvan Cheng <evan.cheng@apple.com>
Thu, 20 Apr 2006 08:54:13 +0000 (08:54 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Thu, 20 Apr 2006 08:54:13 +0000 (08:54 +0000)
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

index 882584f313bb3503bf98780685695e3731c099c4..0a3fb03ecedc40b049c50e870be2acdf3178680a 100644 (file)
@@ -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<SDOperand> &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