Masked Vector Load and Store Intrinsics.
[oota-llvm.git] / include / llvm / Analysis / TargetTransformInfo.h
index 9acaaa6f2eb7466931d26a2bb7fbb9cde83adc18..8af8f77ad67bcd97b411036e09a8d9eda359eebe 100644 (file)
@@ -270,6 +270,13 @@ public:
                                      int64_t BaseOffset, bool HasBaseReg,
                                      int64_t Scale) const;
 
+  /// \brief Return true if the target works with masked instruction
+  /// AVX2 allows masks for consecutive load and store for i32 and i64 elements.
+  /// AVX-512 architecture will also allow masks for non-consecutive memory
+  /// accesses.
+  virtual bool isLegalPredicatedStore(Type *DataType, int Consecutive) const;
+  virtual bool isLegalPredicatedLoad (Type *DataType, int Consecutive) const;
+
   /// \brief Return the cost of the scaling factor used in the addressing
   /// mode represented by AM for this target, for a load/store
   /// of the specified type.