blob: 23c0b99a86204a2ed8143df3c64816d4e7c03a60 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
; 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
}
|