[Mlir-commits] [mlir] [MLIR] Fix issues with XeGPU to XeVM pass. (PR #155946)
Charitha Saumya
llvmlistbot at llvm.org
Thu Aug 28 16:37:44 PDT 2025
================
@@ -354,18 +354,23 @@ class LoadStorePrefetchNdToXeVMPattern : public OpConversionPattern<OpType> {
auto tileH = tdescTy.getDimSize(0);
int32_t vblocks = tdescTy.getArrayLength();
if constexpr (std::is_same_v<OpType, xegpu::StoreNdOp>) {
- VectorType srcVecTy = dyn_cast<VectorType>(adaptor.getValue().getType());
+ Value src = adaptor.getValue();
+ // If store value is a scalar, get value from op instead of adaptor.
+ // Adaptor might have optimized away single element vector
+ if (src.getType().isIntOrFloat()) {
+ src = op.getValue();
+ }
+ VectorType srcVecTy = dyn_cast<VectorType>(src.getType());
if (!srcVecTy)
----------------
charithaintc wrote:
in the prev code it fails here?
https://github.com/llvm/llvm-project/pull/155946
More information about the Mlir-commits
mailing list