summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/Mips/small-section-reserve-gp.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/Mips/small-section-reserve-gp.ll')
-rw-r--r--test/CodeGen/Mips/small-section-reserve-gp.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/small-section-reserve-gp.ll b/test/CodeGen/Mips/small-section-reserve-gp.ll
new file mode 100644
index 0000000..03503fb
--- /dev/null
+++ b/test/CodeGen/Mips/small-section-reserve-gp.ll
@@ -0,0 +1,12 @@
+; RUN: llc -mtriple=mipsel-sde-elf -march=mipsel -relocation-model=static < %s \
+; RUN: | FileCheck %s
+
+@i = internal unnamed_addr global i32 0, align 4
+
+define i32 @geti() nounwind readonly {
+entry:
+; CHECK: lw ${{[0-9]+}}, %gp_rel(i)($gp)
+ %0 = load i32* @i, align 4
+ ret i32 %0
+}
+
OpenPOWER on IntegriCloud