1 ; RUN: llc -O1 < %s -march=mips64 -mcpu=octeon | FileCheck %s -check-prefix=OCTEON 2 ; RUN: llc -O1 < %s -march=mips64 -mcpu=mips64 | FileCheck %s -check-prefix=MIPS64 3 4 define i64 @addi64(i64 %a, i64 %b) nounwind { 5 entry: 6 ; OCTEON-LABEL: addi64: 7 ; OCTEON: jr $ra 8 ; OCTEON: baddu $2, $4, $5 9 ; MIPS64-LABEL: addi64: 10 ; MIPS64: daddu 11 ; MIPS64: jr 12 ; MIPS64: andi 13 %add = add i64 %a, %b 14 %and = and i64 %add, 255 15 ret i64 %and 16 } 17 18 define i64 @mul(i64 %a, i64 %b) nounwind { 19 entry: 20 ; OCTEON-LABEL: mul: 21 ; OCTEON: jr $ra 22 ; OCTEON: dmul $2, $4, $5 23 ; MIPS64-LABEL: mul: 24 ; MIPS64: dmult 25 ; MIPS64: jr 26 ; MIPS64: mflo 27 %res = mul i64 %a, %b 28 ret i64 %res 29 } 30