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
4 define i64 @addi64(i64 %a, i64 %b) nounwind {
6 ; OCTEON-LABEL: addi64:
8 ; OCTEON: baddu $2, $4, $5
9 ; MIPS64-LABEL: addi64:
14 %and = and i64 %add, 255
18 define i64 @mul(i64 %a, i64 %b) nounwind {
22 ; OCTEON: dmul $2, $4, $5
31 define i64 @cmpeq(i64 %a, i64 %b) nounwind {
33 ; OCTEON-LABEL: cmpeq:
35 ; OCTEON: seq $2, $4, $5
36 ; MIPS64-LABEL: cmpeq:
37 ; MIPS64: xor $1, $4, $5
38 ; MIPS64: sltiu $1, $1, 1
39 ; MIPS64: dsll $1, $1, 32
41 ; MIPS64: dsrl $2, $1, 32
42 %res = icmp eq i64 %a, %b
43 %res2 = zext i1 %res to i64
47 define i64 @cmpeqi(i64 %a) nounwind {
49 ; OCTEON-LABEL: cmpeqi:
51 ; OCTEON: seqi $2, $4, 42
52 ; MIPS64-LABEL: cmpeqi:
53 ; MIPS64: daddiu $1, $zero, 42
54 ; MIPS64: xor $1, $4, $1
55 ; MIPS64: sltiu $1, $1, 1
56 ; MIPS64: dsll $1, $1, 32
58 ; MIPS64: dsrl $2, $1, 32
59 %res = icmp eq i64 %a, 42
60 %res2 = zext i1 %res to i64
64 define i64 @cmpne(i64 %a, i64 %b) nounwind {
66 ; OCTEON-LABEL: cmpne:
68 ; OCTEON: sne $2, $4, $5
69 ; MIPS64-LABEL: cmpne:
70 ; MIPS64: xor $1, $4, $5
71 ; MIPS64: sltu $1, $zero, $1
72 ; MIPS64: dsll $1, $1, 32
74 ; MIPS64: dsrl $2, $1, 32
75 %res = icmp ne i64 %a, %b
76 %res2 = zext i1 %res to i64
80 define i64 @cmpnei(i64 %a) nounwind {
82 ; OCTEON-LABEL: cmpnei:
84 ; OCTEON: snei $2, $4, 42
85 ; MIPS64-LABEL: cmpnei:
86 ; MIPS64: daddiu $1, $zero, 42
87 ; MIPS64: xor $1, $4, $1
88 ; MIPS64: sltu $1, $zero, $1
89 ; MIPS64: dsll $1, $1, 32
91 ; MIPS64: dsrl $2, $1, 32
92 %res = icmp ne i64 %a, 42
93 %res2 = zext i1 %res to i64