1 ; RUN: llc < %s -march=mips -mcpu=mips2 | FileCheck %s -check-prefixes=ALL,GP32
2 ; RUN: llc < %s -march=mips -mcpu=mips32 | FileCheck %s -check-prefixes=ALL,GP32
3 ; RUN: llc < %s -march=mips -mcpu=mips32r2 | FileCheck %s \
4 ; RUN: -check-prefixes=ALL,GP32
5 ; RUN: llc < %s -march=mips -mcpu=mips32r3 | FileCheck %s \
6 ; RUN: -check-prefixes=ALL,GP32
7 ; RUN: llc < %s -march=mips -mcpu=mips32r5 | FileCheck %s \
8 ; RUN: -check-prefixes=ALL,GP32
9 ; RUN: llc < %s -march=mips -mcpu=mips32r6 | FileCheck %s \
10 ; RUN: -check-prefixes=ALL,GP32
11 ; RUN: llc < %s -march=mips64 -mcpu=mips3 | FileCheck %s \
12 ; RUN: -check-prefixes=ALL,GP64
13 ; RUN: llc < %s -march=mips64 -mcpu=mips4 | FileCheck %s \
14 ; RUN: -check-prefixes=ALL,GP64
15 ; RUN: llc < %s -march=mips64 -mcpu=mips64 | FileCheck %s \
16 ; RUN: -check-prefixes=ALL,GP64
17 ; RUN: llc < %s -march=mips64 -mcpu=mips64r2 | FileCheck %s \
18 ; RUN: -check-prefixes=ALL,GP64
19 ; RUN: llc < %s -march=mips64 -mcpu=mips64r3 | FileCheck %s \
20 ; RUN: -check-prefixes=ALL,GP64
21 ; RUN: llc < %s -march=mips64 -mcpu=mips64r5 | FileCheck %s \
22 ; RUN: -check-prefixes=ALL,GP64
23 ; RUN: llc < %s -march=mips64 -mcpu=mips64r6 | FileCheck %s \
24 ; RUN: -check-prefixes=ALL,GP64
25 ; RUN: llc < %s -march=mips -mcpu=mips32r3 -mattr=+micromips | FileCheck %s \
26 ; RUN: -check-prefixes=ALL,MM,MM32
27 ; RUN: llc < %s -march=mips -mcpu=mips32r6 -mattr=+micromips | FileCheck %s \
28 ; RUN: -check-prefixes=ALL,MM,MM32
30 define signext i1 @not_i1(i1 signext %a) {
44 define signext i8 @not_i8(i8 signext %a) {
58 define signext i16 @not_i16(i16 signext %a) {
72 define signext i32 @not_i32(i32 signext %a) {
87 define signext i64 @not_i64(i64 signext %a) {
94 ; GP64: daddiu $[[T0:[0-9]+]], $zero, -1
95 ; GP64: xor $2, $4, $[[T0]]
104 define signext i128 @not_i128(i128 signext %a) {
106 ; ALL-LABEL: not_i128:
113 ; GP64: daddiu $[[T0:[0-9]+]], $zero, -1
114 ; GP64: xor $2, $4, $[[T0]]
115 ; GP64: xor $3, $5, $[[T0]]
126 define signext i1 @nor_i1(i1 signext %a, i1 signext %b) {
130 ; GP32: nor $2, $5, $4
131 ; GP64: or $1, $5, $4
132 ; MM32: nor $2, $5, $4
139 define signext i8 @nor_i8(i8 signext %a, i8 signext %b) {
143 ; GP32: nor $2, $5, $4
144 ; GP64: or $1, $5, $4
145 ; MM32: nor $2, $5, $4
152 define signext i16 @nor_i16(i16 signext %a, i16 signext %b) {
154 ; ALL-LABEL: nor_i16:
156 ; GP32: nor $2, $5, $4
157 ; GP64: or $1, $5, $4
158 ; MM32: nor $2, $5, $4
165 define signext i32 @nor_i32(i32 signext %a, i32 signext %b) {
167 ; ALL-LABEL: nor_i32:
169 ; GP32: nor $2, $5, $4
171 ; GP64: or $[[T0:[0-9]+]], $5, $4
172 ; GP64: sll $[[T1:[0-9]+]], $[[T0]], 0
173 ; GP64: not $[[T2:[0-9]+]], $[[T1]]
174 ; GP64: sll $2, $[[T2]], 0
176 ; MM32: nor $2, $5, $4
184 define signext i64 @nor_i64(i64 signext %a, i64 signext %b) {
186 ; ALL-LABEL: nor_i64:
188 ; GP32: nor $2, $6, $4
189 ; GP32: nor $3, $7, $5
191 ; GP64: nor $2, $5, $4
193 ; MM32: nor $2, $6, $4
194 ; MM32: nor $3, $7, $5
201 define signext i128 @nor_i128(i128 signext %a, i128 signext %b) {
203 ; ALL-LABEL: nor_i128:
205 ; GP32: lw $[[T1:[0-9]+]], 20($sp)
206 ; GP32: lw $[[T2:[0-9]+]], 16($sp)
207 ; GP32: nor $2, $[[T2]], $4
208 ; GP32: nor $3, $[[T1]], $5
209 ; GP32: lw $[[T0:[0-9]+]], 24($sp)
210 ; GP32: nor $4, $[[T0]], $6
211 ; GP32: lw $[[T3:[0-9]+]], 28($sp)
212 ; GP32: nor $5, $[[T3]], $7
214 ; GP64: nor $2, $6, $4
215 ; GP64: nor $3, $7, $5
217 ; MM32: lw $[[T1:[0-9]+]], 20($sp)
218 ; MM32: lw $[[T2:[0-9]+]], 16($sp)
219 ; MM32: nor $2, $[[T2]], $4
220 ; MM32: nor $3, $[[T1]], $5
221 ; MM32: lw $[[T0:[0-9]+]], 24($sp)
222 ; MM32: nor $4, $[[T0]], $6
223 ; MM32: lw $[[T3:[0-9]+]], 28($sp)
224 ; MM32: nor $5, $[[T3]], $7
227 %r = xor i128 %or, -1