[Mlir-commits] [mlir] [MLIR][MemRefToLLVM] Fix crash in MemorySpaceCastOpLowering when type conversion fails (PR #186404)
Ivan Butygin
llvmlistbot at llvm.org
Fri Mar 13 07:30:05 PDT 2026
================
@@ -1255,8 +1255,10 @@ struct MemorySpaceCastOpLowering
Type resultType = op.getDest().getType();
if (auto resultTypeR = dyn_cast<MemRefType>(resultType)) {
- auto resultDescType =
- cast<LLVM::LLVMStructType>(typeConverter->convertType(resultTypeR));
+ Type convertedType = typeConverter->convertType(resultTypeR);
----------------
Hardcode84 wrote:
maybe `typeConverter->convertType<LLVM::LLVMStructType>` which will also check cast succeeded?
https://github.com/llvm/llvm-project/pull/186404
More information about the Mlir-commits
mailing list