summaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine/alloca.ll
blob: c5d7818229799370bb2c9ed99c7e9187722d3fef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
; Zero byte allocas should be deleted.

; RUN: llvm-upgrade < %s | llvm-as | opt -instcombine | llvm-dis | not grep alloca

declare void %use(...)
void %test() {
	%X = alloca [0 x int]
	call void(...)* %use([0 x int] *%X)
	%Y = alloca int, uint 0
	call void(...)* %use(int* %Y)
	%Z = alloca {}
	call void(...)* %use({}* %Z)
	ret void
}