summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/Mips/octeon.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen/Mips/octeon.ll')
-rw-r--r--llvm/test/CodeGen/Mips/octeon.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/Mips/octeon.ll b/llvm/test/CodeGen/Mips/octeon.ll
new file mode 100644
index 00000000000..092938a6b5c
--- /dev/null
+++ b/llvm/test/CodeGen/Mips/octeon.ll
@@ -0,0 +1,15 @@
+; RUN: llc -O1 < %s -march=mips64 -mcpu=octeon | FileCheck %s -check-prefix=OCTEON
+; RUN: llc -O1 < %s -march=mips64 -mcpu=mips64 | FileCheck %s -check-prefix=MIPS64
+
+define i64 @mul(i64 %a, i64 %b) nounwind {
+entry:
+; OCTEON-LABEL: mul:
+; OCTEON: jr $ra
+; OCTEON: dmul $2, $4, $5
+; MIPS64-LABEL: mul:
+; MIPS64: dmult
+; MIPS64: jr
+; MIPS64: mflo
+ %res = mul i64 %a, %b
+ ret i64 %res
+}
OpenPOWER on IntegriCloud