summaryrefslogtreecommitdiff
path: root/test/MC/Mips/init-order-bug.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/MC/Mips/init-order-bug.ll')
-rw-r--r--test/MC/Mips/init-order-bug.ll12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/MC/Mips/init-order-bug.ll b/test/MC/Mips/init-order-bug.ll
new file mode 100644
index 0000000000000..5e9726247870e
--- /dev/null
+++ b/test/MC/Mips/init-order-bug.ll
@@ -0,0 +1,12 @@
+; RUN: llc -mtriple=mipsel-linux-gnu -relocation-model=pic -filetype=asm < %s | \
+; RUN: llvm-mc -triple=mipsel-linux-gnu --position-independent -filetype=obj | \
+; RUN: llvm-objdump -d - | FileCheck %s
+; RUN: llc -mtriple=mipsel-linux-gnu -relocation-model=pic -filetype=obj < %s | \
+; RUN: llvm-objdump -d - | FileCheck %s
+
+define void @foo() {
+ call void asm sideeffect "\09.cprestore 512", "~{$1}"()
+ ret void
+}
+
+; CHECK: sw $gp, 512($sp)