[Mlir-commits] [mlir] Fix crash when using when using --finalize-memref-to-llvm (PR #112433)
Christian Ulmann
llvmlistbot at llvm.org
Tue Oct 15 23:42:22 PDT 2024
================
@@ -527,8 +527,11 @@ LLVMTypeConverter::getMemRefAddressSpace(BaseMemRefType type) const {
return failure();
if (!(*converted)) // Conversion to default is 0.
return 0;
- if (auto explicitSpace = llvm::dyn_cast_if_present<IntegerAttr>(*converted))
- return explicitSpace.getInt();
+ if (auto explicitSpace = llvm::dyn_cast_if_present<IntegerAttr>(*converted)) {
----------------
Dinistro wrote:
```suggestion
if (auto explicitSpace = dyn_cast_if_present<IntegerAttr>(*converted)) {
```
https://github.com/llvm/llvm-project/pull/112433
More information about the Mlir-commits
mailing list