[Mlir-commits] [mlir] [mlir][vector][NFC] Add deprecation notice to splat's .td (PR #149532)
James Newling
llvmlistbot at llvm.org
Fri Jul 18 08:33:15 PDT 2025
https://github.com/newling created https://github.com/llvm/llvm-project/pull/149532
Part of deprecation of vector.splat
RFC: https://discourse.llvm.org/t/rfc-mlir-vector-deprecate-then-remove-vector-splat/87143/4
More complete deprecation: https://github.com/llvm/llvm-project/pull/147818
>From a844b92d3b662160b6a110cb03d5c68b7c475a83 Mon Sep 17 00:00:00 2001
From: James Newling <james.newling at gmail.com>
Date: Fri, 18 Jul 2025 08:32:40 -0700
Subject: [PATCH] add notice to splat op .td
---
mlir/include/mlir/Dialect/Vector/IR/VectorOps.td | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
index cbe490f6e4dd1..d32347e1fee01 100644
--- a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
+++ b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
@@ -2919,6 +2919,8 @@ def Vector_SplatOp : Vector_Op<"splat", [
]> {
let summary = "vector splat or broadcast operation";
let description = [{
+ Note: This operation is deprecated. Please use vector.broadcast.
+
Broadcast the operand to all elements of the result vector. The type of the
operand must match the element type of the vector type.
@@ -2928,6 +2930,13 @@ def Vector_SplatOp : Vector_Op<"splat", [
%s = arith.constant 10.1 : f32
%t = vector.splat %s : vector<8x16xf32>
```
+
+ This operation is deprecated, the preferred representation of the above is:
+
+ ```mlir
+ %s = arith.constant 10.1 : f32
+ %t = vector.broadcast %s : f32 to vector<8x16xf32>
+ ```
}];
let arguments = (ins AnyType:$input);
More information about the Mlir-commits
mailing list