summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips
diff options
context:
space:
mode:
authorPetar Jovanovic <petar.jovanovic@mips.com>2018-02-23 11:06:40 +0000
committerPetar Jovanovic <petar.jovanovic@mips.com>2018-02-23 11:06:40 +0000
commitfac93e28f066b6a25b480c0d4334f94473ea1571 (patch)
treedaa696312dda8de6c1bbe32fc1437d203e18dc0a /llvm/test/CodeGen/Mips
parentdb1a06244758537fe831a680ce2b1aedcafafe23 (diff)
downloadbcm5719-llvm-fac93e28f066b6a25b480c0d4334f94473ea1571.tar.gz
bcm5719-llvm-fac93e28f066b6a25b480c0d4334f94473ea1571.zip
[MIPS GlobalISel] Adding GlobalISel
Add GlobalISel infrastructure up to the point where we can select a ret void. Patch by Petar Avramovic. Differential Revision: https://reviews.llvm.org/D43583 llvm-svn: 325888
Diffstat (limited to 'llvm/test/CodeGen/Mips')
-rw-r--r--llvm/test/CodeGen/Mips/GlobalISel/irtranslator/ret.ll11
-rw-r--r--llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/ret.ll12
2 files changed, 23 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Mips/GlobalISel/irtranslator/ret.ll b/llvm/test/CodeGen/Mips/GlobalISel/irtranslator/ret.ll
new file mode 100644
index 00000000000..a8e710c63c8
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/GlobalISel/irtranslator/ret.ll
@@ -0,0 +1,11 @@
+; NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
+; RUN: llc -O0 -mtriple=mipsel-linux-gnu -global-isel -stop-after=irtranslator -verify-machineinstrs %s -o - | FileCheck %s -check-prefixes=MIPS32
+
+
+define void @void() {
+ ; MIPS32-LABEL: name: void
+ ; MIPS32: bb.1.entry:
+ ; MIPS32: RetRA
+entry:
+ ret void
+}
diff --git a/llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/ret.ll b/llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/ret.ll
new file mode 100644
index 00000000000..0c89e15a3d1
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/ret.ll
@@ -0,0 +1,12 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -O0 -mtriple=mipsel-linux-gnu -global-isel -verify-machineinstrs %s -o -| FileCheck %s -check-prefixes=MIPS32
+
+define void @void() {
+; MIPS32-LABEL: void:
+; MIPS32: # %bb.0: # %entry
+; MIPS32-NEXT: jr $ra
+; MIPS32-NEXT: nop
+entry:
+ ret void
+}
+
OpenPOWER on IntegriCloud