llvm.org GIT mirror llvm / release_22 test / Analysis / BasicAA / 2005-03-09-BrokenBasicAA.ll
release_22

Tree @release_22 (Download .tar.gz)

2005-03-09-BrokenBasicAA.ll @release_22raw · history · blame

; 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
}