aboutsummaryrefslogtreecommitdiff
path: root/mlir/lib/Dialect/Math/IR/MathOps.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Dialect/Math/IR/MathOps.cpp')
-rw-r--r--mlir/lib/Dialect/Math/IR/MathOps.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/mlir/lib/Dialect/Math/IR/MathOps.cpp b/mlir/lib/Dialect/Math/IR/MathOps.cpp
index a21631c..bbeef0f 100644
--- a/mlir/lib/Dialect/Math/IR/MathOps.cpp
+++ b/mlir/lib/Dialect/Math/IR/MathOps.cpp
@@ -285,6 +285,16 @@ OpFoldResult math::SinhOp::fold(FoldAdaptor adaptor) {
}
//===----------------------------------------------------------------------===//
+// SinCosOp getShapeForUnroll
+//===----------------------------------------------------------------------===//
+
+std::optional<SmallVector<int64_t, 4>> math::SincosOp::getShapeForUnroll() {
+ if (auto vt = mlir::dyn_cast<VectorType>(getOperand().getType()))
+ return llvm::to_vector<4>(vt.getShape());
+ return std::nullopt;
+}
+
+//===----------------------------------------------------------------------===//
// CountLeadingZerosOp folder
//===----------------------------------------------------------------------===//