mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
465e24ba20
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20530 91177308-0d34-0410-b5e6-96231b3b80d8
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
|
|
}
|