aboutsummaryrefslogtreecommitdiff
path: root/test/Analysis/BasicAA/2005-03-09-BrokenBasicAA.ll
blob: e8289109ddec6c7ddc12f785185de20466768c28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
; RUN: llvm-upgrade < %s | llvm-as | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'load int\* %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
}