diff options
author | Matthias Springer <me@m-sp.org> | 2024-10-04 17:32:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-10-04 17:32:31 +0200 |
commit | 6937dbbe51391471f3cf50fe2b8fa2cd14080a3b (patch) | |
tree | fe2d2fc0811e52b1ca0c654d312d471eb85a2c59 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | 19992eea2300f1e97a71013b50f582538cad5022 (diff) | |
download | llvm-6937dbbe51391471f3cf50fe2b8fa2cd14080a3b.zip llvm-6937dbbe51391471f3cf50fe2b8fa2cd14080a3b.tar.gz llvm-6937dbbe51391471f3cf50fe2b8fa2cd14080a3b.tar.bz2 |
[mlir][memref] Fix `alloca` lowering with 0 dimensions (#111119)
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.
```
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
0 files changed, 0 insertions, 0 deletions