[Mlir-commits] [mlir] [mlir][memref] Fix type conversion in emulate-wide-int and emulate-narrow-type (PR #112214)
Jakub Kuderski
llvmlistbot at llvm.org
Mon Oct 14 07:44:18 PDT 2024
================
@@ -169,7 +169,7 @@ struct ConvertMemRefAllocation final : OpConversionPattern<OpTy> {
std::is_same<OpTy, memref::AllocaOp>(),
"expected only memref::AllocOp or memref::AllocaOp");
auto currentType = cast<MemRefType>(op.getMemref().getType());
- auto newResultType = dyn_cast<MemRefType>(
+ auto newResultType = dyn_cast_or_null<MemRefType>(
----------------
kuhar wrote:
These shouldn't do casting, just pass the expected type to `convertType<T>`. Also everywhere below.
https://github.com/llvm/llvm-project/pull/112214
More information about the Mlir-commits
mailing list