[Mlir-commits] [mlir] 30705c5 - [mlir][vector][NFC] Add deprecation notice to splat's .td (#149532)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Mon Jul 21 10:15:05 PDT 2025


Author: James Newling
Date: 2025-07-21T10:15:02-07:00
New Revision: 30705c5840f42f48d608b56e1efccfdbecec8f0a

URL: https://github.com/llvm/llvm-project/commit/30705c5840f42f48d608b56e1efccfdbecec8f0a
DIFF: https://github.com/llvm/llvm-project/commit/30705c5840f42f48d608b56e1efccfdbecec8f0a.diff

LOG: [mlir][vector][NFC] Add deprecation notice to splat's .td (#149532)

Part of deprecation of vector.splat

RFC: https://discourse.llvm.org/t/rfc-mlir-vector-deprecate-then-remove-vector-splat/87143/4

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Vector/IR/VectorOps.td

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
index 5399df4146d96..0a5c1e5d9ab97 100644
--- a/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
+++ b/mlir/include/mlir/Dialect/Vector/IR/VectorOps.td
@@ -2850,6 +2850,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.
 
@@ -2859,6 +2861,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