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

declare double* @useit(i32*)

define i32 @foo(i32 %Amt) {
	%A = malloc i32, i32 %Amt
	%P = call double*  @useit(i32* %A)

	%X = load i32* %A
	store double 0.0, double* %P
	%Y = load i32* %A
	%Z = sub i32 %X, %Y
	ret i32 %Z
}
OpenPOWER on IntegriCloud