blob: 7560143207107f6f83aeb7af5f2efe4785670906 [file] [log] [blame]
Chris Lattner465e24b2005-03-09 16:29:22 +00001; RUN: llvm-as < %s | opt -basicaa -load-vn -gcse -instcombine | llvm-dis | grep 'load int\* %A'
2
3declare double* %useit(int*)
4
5int %foo(uint %Amt) {
6 %A = malloc int, uint %Amt
7 %P = call double* %useit(int* %A)
8
9 %X = load int* %A
10 store double 0.0, double* %P
11 %Y = load int* %A
12 %Z = sub int %X, %Y
13 ret int %Z
14}