2008-02-17 20:02:20 +00:00
|
|
|
; RUN: llvm-as < %s | llc -march=arm | \
|
2007-08-15 13:36:28 +00:00
|
|
|
; RUN: grep {ldr r0} | count 3
|
2006-08-14 19:01:24 +00:00
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define i32 @f1(i32* %v) {
|
2006-08-14 19:01:24 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp = load i32* %v ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp
|
2006-08-14 19:01:24 +00:00
|
|
|
}
|
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define i32 @f2(i32* %v) {
|
2006-08-14 19:01:24 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp2 = getelementptr i32* %v, i32 1023 ; <i32*> [#uses=1]
|
|
|
|
%tmp = load i32* %tmp2 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp
|
2006-08-14 19:01:24 +00:00
|
|
|
}
|
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define i32 @f3(i32* %v) {
|
2006-08-14 19:01:24 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp2 = getelementptr i32* %v, i32 1024 ; <i32*> [#uses=1]
|
|
|
|
%tmp = load i32* %tmp2 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp
|
2006-08-14 19:01:24 +00:00
|
|
|
}
|
2008-02-17 20:02:20 +00:00
|
|
|
|