This change builds on #174336 and #175880, which introduced shared
VerificationUtils with verifyDynamicDimensionCount() and
verifyRanksMatch() methods.
This patch adds a new verifyElementTypesMatch() verification utility
that checks if two shaped types have matching element types and emits
consistent error messages. The utility is applied to several ops across
the MemRef and Vector dialects.
This change builds on https://github.com/llvm/llvm-project/pull/174336,
which introduced shared VerificationUtils with an initial
verifyDynamicDimensionCount() method.
This patch adds a new verifyRanksMatch() verification utility that
checks if two shaped types have matching ranks and emits consistent
error messages. The utility is applied to several ops across multiple
MLIR dialects.
---------
Co-authored-by: Andrzej Warzyński <andrzej.warzynski@gmail.com>
Introduces `VerificationUtils` to consolidate common operation
verification patterns in MLIR. This initial implementation provides
`verifyDynamicDimensionCount()` to reduce code duplication across
dialect verifiers.
This is an NFC (No Functional Change) refactoring that improves code
maintainability by extracting reusable verification logic into a shared
utility.