summaryrefslogtreecommitdiff
path: root/test/CodeGen/Thumb2/load-global.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/Thumb2/load-global.ll')
-rw-r--r--test/CodeGen/Thumb2/load-global.ll9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/CodeGen/Thumb2/load-global.ll b/test/CodeGen/Thumb2/load-global.ll
new file mode 100644
index 0000000000000..0ffcb9575d5c2
--- /dev/null
+++ b/test/CodeGen/Thumb2/load-global.ll
@@ -0,0 +1,9 @@
+; RUN: llvm-as < %s | llc -mtriple=thumbv7-apple-darwin
+; RUN: llvm-as < %s | llc -mtriple=thumbv7-apple-darwin -relocation-model=pic | grep add | grep pc
+
+@G = external global i32
+
+define i32 @test1() {
+ %tmp = load i32* @G
+ ret i32 %tmp
+}