diff options
| author | Kai Nacke <kai.nacke@redstar.de> | 2014-04-02 18:40:43 +0000 |
|---|---|---|
| committer | Kai Nacke <kai.nacke@redstar.de> | 2014-04-02 18:40:43 +0000 |
| commit | b96fc4a5eabc62889ba4b28a67038b3cfaba83ac (patch) | |
| tree | ecaf113d458750dc3555ec25afc302aac45d2a5d /test/CodeGen | |
| parent | 6408bdcacdf24207f9f7464f756431835ff0916f (diff) | |
| download | llvm-b96fc4a5eabc62889ba4b28a67038b3cfaba83ac.tar.gz llvm-b96fc4a5eabc62889ba4b28a67038b3cfaba83ac.tar.bz2 llvm-b96fc4a5eabc62889ba4b28a67038b3cfaba83ac.tar.xz | |
[mips] Add more Octeon cnMips instructions
Adds the instructions ext/ext32/cins/cins32.
It also changes pop/dpop to accept the two operand version and
adds a simple pattern to generate baddu.
Tests for the two operand versions (including baddu/dmul/dpop/pop)
and the code generation pattern for baddu are included.
Reviewed by: Daniel.Sanders@imgtec.com
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205449 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen')
| -rw-r--r-- | test/CodeGen/Mips/octeon.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/Mips/octeon.ll b/test/CodeGen/Mips/octeon.ll index 092938a6b5..d5ff9bdf36 100644 --- a/test/CodeGen/Mips/octeon.ll +++ b/test/CodeGen/Mips/octeon.ll @@ -1,6 +1,20 @@ ; 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 @addi64(i64 %a, i64 %b) nounwind { +entry: +; OCTEON-LABEL: addi64: +; OCTEON: jr $ra +; OCTEON: baddu $2, $4, $5 +; MIPS64-LABEL: addi64: +; MIPS64: daddu +; MIPS64: jr +; MIPS64: andi + %add = add i64 %a, %b + %and = and i64 %add, 255 + ret i64 %and +} + define i64 @mul(i64 %a, i64 %b) nounwind { entry: ; OCTEON-LABEL: mul: |
