mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-30 15:32:52 +01:00
0d91a3c867
llvm-svn: 20530
15 lines
318 B
LLVM
15 lines
318 B
LLVM
; RUN: llvm-as < %s | 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
|
|
}
|