summaryrefslogtreecommitdiff
path: root/test/ExecutionEngine/test-malloc.ll
blob: b3400df44092152b269500598e4a0f87f257bdd1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
; RUN: lli %s > /dev/null

define i32 @main() {
	%X = malloc i32		; <i32*> [#uses=1]
	%Y = malloc i32, i32 100		; <i32*> [#uses=1]
	%u = add i32 1, 2		; <i32> [#uses=1]
	%Z = malloc i32, i32 %u		; <i32*> [#uses=1]
	free i32* %X
	free i32* %Y
	free i32* %Z
	ret i32 0
}