[all-commits] [llvm/llvm-project] f6ddf3: [mlir][ArmNeon] Reject masked contractions in `I8M...
Federico Bruzzone via All-commits
all-commits at lists.llvm.org
Thu Aug 6 03:27:02 PDT 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f6ddf3965910afb16285418fe7bbb9ca36a8b18e
https://github.com/llvm/llvm-project/commit/f6ddf3965910afb16285418fe7bbb9ca36a8b18e
Author: Federico Bruzzone <federico.bruzzone.i at gmail.com>
Date: 2026-08-06 (Thu, 06 Aug 2026)
Changed paths:
M mlir/lib/Dialect/ArmNeon/Transforms/LowerContractToNeonPatterns.cpp
M mlir/test/Dialect/ArmNeon/lower-to-arm-neon.mlir
Log Message:
-----------
[mlir][ArmNeon] Reject masked contractions in `I8MM/BFMMLA` lowering patterns (#213698)
`LowerContractionToNeonI8MMPattern` and
`LowerContractionToNeonBFMMLAPattern` rewrite a `vector.contract` into
several ops (multiple `arm_neon.intr.smmla`/`bfmmla` calls plus
`extract/insert/shape_cast` scaffolding).
When the matched `vector.contract` sits inside a `vector.mask` (e.g.,
from vectorizing a matmul with dynamically-shaped operands), this
in-place multi-op rewrite violates `vector.mask`'s invariant that its
region contain exactly **one** operation, and the verifier rejects the
result: _error: 'vector.mask' op expects only one operation to mask_.
Neither pattern checked for masking, unlike the generic
contraction-lowering
patterns. To fix the problem, we bail out via `notifyMatchFailure` when
the contraction is masked, so it falls through to a different lowering
path instead of producing invalid IR.
Found while adding neon `linalg.matmul` e2e tests in #212809.
AI was used to investigate the problem.
---------
Signed-off-by: Federico Bruzzone <federico.bruzzone.i at gmail.com>
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list