[all-commits] [llvm/llvm-project] 3e3b23: [mlir][memref] Fix alloca lowering with 0 dimensions
Matthias Springer via All-commits
all-commits at lists.llvm.org
Fri Oct 4 01:36:05 PDT 2024
Branch: refs/heads/users/matthias-springer/alloca_zero
Home: https://github.com/llvm/llvm-project
Commit: 3e3b23f6b4bcfa1a30a2a5a2acc4b73868829720
https://github.com/llvm/llvm-project/commit/3e3b23f6b4bcfa1a30a2a5a2acc4b73868829720
Author: Matthias Springer <mspringer at nvidia.com>
Date: 2024-10-04 (Fri, 04 Oct 2024)
Changed paths:
M mlir/lib/Conversion/LLVMCommon/Pattern.cpp
M mlir/test/Conversion/MemRefToLLVM/convert-static-memref-ops.mlir
Log Message:
-----------
[mlir][memref] Fix alloca lowering with 0 dimensions
The `memref.alloca` lowering computed the allocation size incorrectly when there were 0 dimensions.
Previously:
```
memref.alloca() : memref<10x0x2xf32>
--> llvm.alloca 20xf32
```
Now:
```
memref.alloca() : memref<10x0x2xf32>
--> llvm.alloca 0xf32
```
>From the `llvm.alloca` documentation:
```
Allocating zero bytes is legal, but the returned pointer may not be unique.
```
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