[Mlir-commits] [mlir] [MLIR][Vector] Generalize broadcast lowering for single-element vector to nD (PR #206501)
Artem Kroviakov
llvmlistbot at llvm.org
Tue Jun 30 02:11:19 PDT 2026
================
@@ -52,9 +52,9 @@ class BroadcastOpLowering : public OpRewritePattern<vector::BroadcastOp> {
int64_t srcRank = srcType.getRank();
int64_t dstRank = dstType.getRank();
- // Here we are broadcasting to a rank-1 vector. Ensure that the source is a
- // scalar.
- if (srcRank <= 1 && dstRank == 1) {
+ // A broadcast from a single-element source vector is equivalent to scalar
----------------
akroviakov wrote:
Done
https://github.com/llvm/llvm-project/pull/206501
More information about the Mlir-commits
mailing list