New testcase, the optimizer can delete zero sized allocas
[oota-llvm.git] / test / Transforms / InstCombine / alloca.ll
1 ; Zero byte allocas should be deleted.
2
3 ; RUN: llvm-as < %s | opt -instcombine | llvm-dis | not grep alloca
4
5 declare void %use(...)
6 void %test() {
7         %X = alloca [0 x int]
8         call void(...)* %use([0 x int] *%X)
9         %Y = alloca int, uint 0
10         call void(...)* %use(int* %Y)
11         %Z = alloca {}
12         call void(...)* %use({}* %Z)
13         ret void
14 }