[Mlir-commits] [mlir] [mlir][vector] vector.splat deprecation: folding/canonicalizing parity with broadcast (PR #150284)
Andrzej WarzyĆski
llvmlistbot at llvm.org
Tue Jul 29 12:50:30 PDT 2025
================
@@ -1288,19 +1288,46 @@ LogicalResult vector::ExtractElementOp::verify() {
return success();
}
+/// Consider the defining operation `defOp` of `value`. If `defOp` is a
+/// vector.splat or a vector.broadcast with a scalar operand, return the scalar
+/// value that is splatted. Otherwise return null.
+///
+/// Cases where null is not returned:
+///
+/// scalar_source --> vector.splat --> value - return scalar_source
+/// scalar_source --> vector.broadcast --> value - return scalar_source
+static Value getSplatSource(Value value) {
----------------
banach-space wrote:
```suggestion
static Value getScalarSplatSource(Value value) {
```
https://github.com/llvm/llvm-project/pull/150284
More information about the Mlir-commits
mailing list