mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-09 10:05:41 +00:00
6263f94674
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47238 91177308-0d34-0410-b5e6-96231b3b80d8
24 lines
570 B
LLVM
24 lines
570 B
LLVM
; RUN: llvm-as < %s | llc -march=arm | \
|
|
; RUN: grep {ldr r0} | count 3
|
|
|
|
define i32 @f1(i32* %v) {
|
|
entry:
|
|
%tmp = load i32* %v ; <i32> [#uses=1]
|
|
ret i32 %tmp
|
|
}
|
|
|
|
define i32 @f2(i32* %v) {
|
|
entry:
|
|
%tmp2 = getelementptr i32* %v, i32 1023 ; <i32*> [#uses=1]
|
|
%tmp = load i32* %tmp2 ; <i32> [#uses=1]
|
|
ret i32 %tmp
|
|
}
|
|
|
|
define i32 @f3(i32* %v) {
|
|
entry:
|
|
%tmp2 = getelementptr i32* %v, i32 1024 ; <i32*> [#uses=1]
|
|
%tmp = load i32* %tmp2 ; <i32> [#uses=1]
|
|
ret i32 %tmp
|
|
}
|
|
|