[all-commits] [llvm/llvm-project] bbd5b1: [mlir][VectorToXeGPU] Fix crash on memref with non...
Mehdi Amini via All-commits
all-commits at lists.llvm.org
Tue Mar 3 03:33:25 PST 2026
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bbd5b1d3bd073c239b36359932c3049b0d5c83bd
https://github.com/llvm/llvm-project/commit/bbd5b1d3bd073c239b36359932c3049b0d5c83bd
Author: Mehdi Amini <joker.eph at gmail.com>
Date: 2026-03-03 (Tue, 03 Mar 2026)
Changed paths:
M mlir/lib/Conversion/VectorToXeGPU/VectorToXeGPU.cpp
M mlir/test/Conversion/VectorToXeGPU/store-to-xegpu.mlir
Log Message:
-----------
[mlir][VectorToXeGPU] Fix crash on memref with non-scalar element type (#183905)
The vector.store and vector.load lowering in --convert-vector-to-xegpu
would crash when the source memref had a non-integer/float element type
(e.g. memref<?xvector<4xf32>>).
The crash occurred inside createNdDescriptor() when computing the byte
offset for dynamic memrefs: srcTy.getElementTypeBitWidth() internally
calls getIntOrFloatBitWidth() which asserts on non-scalar types such as
vector<4xf32>.
Fix by adding a check for the memref's element type in
storeLoadPreconditions(). If the element type is not an integer or
float, the pattern returns notifyMatchFailure() instead of proceeding
and crashing.
The same guard is applied to TransferReadLowering and
TransferWriteLowering which share the same helper and can hit the same
path.
Fixes #181463
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