summaryrefslogtreecommitdiff
path: root/test/Transforms/DSAnalysis/basictest.ll
blob: a3583a1475cefd4945a2e07a554cc12aa91e74e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
; very simple test
;
; RUN: opt -analyze %s -tddatastructure

implementation

int *%foo(ulong %A, double %B, long %C) {
	%X = malloc int*
	%D = cast int** %X to ulong
	%E = cast ulong %D to int*
	store int* %E, int** %X

	%F = malloc {int}
	%G = getelementptr {int}* %F, long 0, ubyte 0
	store int* %G, int** %X

	%K = malloc int **
	store int** %X, int***%K

	%H = cast long %C to int*
	ret int* null ; %H
}