summaryrefslogtreecommitdiff
path: root/test/CodeGen/ARM/ldr.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/ARM/ldr.ll')
-rw-r--r--test/CodeGen/ARM/ldr.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/ARM/ldr.ll b/test/CodeGen/ARM/ldr.ll
new file mode 100644
index 0000000000000..23c0b99a86204
--- /dev/null
+++ b/test/CodeGen/ARM/ldr.ll
@@ -0,0 +1,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
+}
+