aboutsummaryrefslogtreecommitdiffstats
path: root/test/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll
blob: f7f42ba976093f323df3d7fe14468b0e508b60d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine |\
; RUN:    llvm-dis | grep {load i32\\* %A}

declare double* %useit(int*)

int %foo(uint %Amt) {
	%A = malloc int, uint %Amt
	%P = call double*  %useit(int* %A)

	%X = load int* %A
	store double 0.0, double* %P
	%Y = load int* %A
	%Z = sub int %X, %Y
	ret int %Z
}