[llvm] [Matrix][IR] Cap stride bitwidth at 64 (PR #163729)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 17 02:10:27 PDT 2025
================
@@ -6479,9 +6479,12 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
NumRows->getZExtValue() * NumColumns->getZExtValue(),
"Result of a matrix operation does not fit in the returned vector!");
- if (Stride)
+ if (Stride) {
+ Check(Stride->getBitWidth() <= 64, "Stride bitwidth cannot exceed 64!",
----------------
fhahn wrote:
The restriction in the verifier is mostly just so we can use getZExtValue() on it.
Regardless of the type width, stride, stride, columns, rows must be such that we can access all data without wrapping the address space. Restricting to i32 on 32 bit targets wouldn't really help to enforce that, as it would still be possible to provide arguments that would cause the accesses to wrap.
https://github.com/llvm/llvm-project/pull/163729
More information about the llvm-commits
mailing list