Lines Matching full:gpr

443   let MIOperandInfo = (ops GPR, uimm5);
528 [(set GPR:$rz, (or GPR:$rx, uimm16:$imm16))]>;
533 (outs GPR:$rz), (ins GPR:$rx, uimm5:$imm5),
534 [(set GPR:$rz, (shl GPR:$rx, uimm5:$imm5))]>;
536 (outs GPR:$rz), (ins GPR:$rx, uimm5:$imm5),
537 [(set GPR:$rz, (srl GPR:$rx, uimm5:$imm5))]>;
539 (outs GPR:$rz), (ins GPR:$rx, uimm5:$imm5),
540 [(set GPR:$rz, (sra GPR:$rx, uimm5:$imm5))]>;
542 (outs GPR:$rz), (ins GPR:$rx, uimm5:$imm5),
543 [(set GPR:$rz, (rotl GPR:$rx, uimm5:$imm5))]>;
545 def ROTRI32 : CSKYPseudo<(outs GPR:$rz), (ins GPR:$rx, oimm5:$imm5),
567 def NOT32 : R_XXZ<0b001001, 0b00100, (outs GPR:$rz), (ins GPR:$rx),
568 "not32", [(set GPR:$rz, (not GPR:$rx))]>;
571 def NEG32 : CSKYPseudo<(outs GPR:$rd), (ins GPR:$rx), "neg32 $rd, $rx", []>;
574 def RSUBI32 : CSKYPseudo<(outs GPR:$rd), (ins GPR:$rx, uimm12:$imm12), "rsubi32 $rd, $rx, $imm12", []>;
576 def : Pat<(add GPR:$rs1, (oimm12_neg:$im)),
577 (SUBI32 GPR:$rs1, (imm_neg_XFORM oimm12_neg:$im))>;
590 (outs GPR:$rz, CARRY:$cout), (ins GPR:$rx, oimm5:$imm5), []>;
592 (outs GPR:$rz, CARRY:$cout), (ins GPR:$rx, oimm5:$imm5), []>;
594 (outs GPR:$rz, CARRY:$cout), (ins GPR:$rx, oimm5:$imm5), []>;
596 (outs GPR:$rz, CARRY:$cout), (ins GPR:$rx, oimm5:$imm5, CARRY:$cin), []>;
607 def ADDC32 : R_YXZ<0x31, 0x0, 0x2, (outs GPR:$rz, CARRY:$cout),
608 (ins GPR:$rx, GPR:$ry, CARRY:$cin), "addc32", []>;
609 def SUBC32 : R_YXZ<0x31, 0x0, 0x8, (outs GPR:$rz, CARRY:$cout),
610 (ins GPR:$rx, GPR:$ry, CARRY:$cin), "subc32", []>;
625 (outs GPR:$rz, CARRY:$cout), (ins GPR:$rx, uimm5:$imm5), []>;
627 (outs GPR:$rz, CARRY:$cout), (ins GPR:$rx, uimm5:$imm5), []>;
629 (outs GPR:$rz, CARRY:$cout), (ins GPR:$rx, uimm5:$imm5), []>;
631 def SEXT32 : I_5_XZ_U<0x16, (outs GPR:$rz), (ins GPR:$rx, uimm5:$msb, uimm5:$lsb), "sext32", []>;
638 def ZEXT32 : I_5_XZ_U<0x15, (outs GPR:$rz), (ins GPR:$rx, uimm5:$msb, uimm5:$lsb), "zext32",[]>;
641 def INS32 : I_5_XZ_INS<0b010111, (outs GPR:$rz), (ins GPR:$rZ, GPR:$rx, uimm5_msb_size:$msb, uimm5:$lsb), "ins32", []>;
646 (ins GPR:$rx, GPR:$ry), "mul.s32", []>;
648 (ins GPR:$rx, GPR:$ry), "mul.u32", []>;
652 (ins GPRPair:$rz, GPR:$rx, GPR:$ry), "mula.s32", []>;
654 (ins GPRPair:$rz, GPR:$rx, GPR:$ry), "mula.u32", []>;
658 def MULSH32 : R_YXZ<0x31, 0b100100, 0b00001, (outs GPR:$rz),
659 (ins GPR:$rx, GPR:$ry), "mulsh32", []>;
677 (outs), (ins GPR:$rx, regseq:$regs, variable_ops), "ldm32\t$regs, (${rx})", []>;
679 (outs), (ins GPR:$rx, regseq:$regs, variable_ops), "stm32\t$regs, (${rx})", []>;
682 def LDQ32 : CSKYPseudo<(outs), (ins GPR:$rx, regseq:$regs, variable_ops),
684 def STQ32 : CSKYPseudo<(outs), (ins GPR:$rx, regseq:$regs, variable_ops),
694 let InOperandList = (ins GPRPair:$rz, GPR:$rx, uimm12_2:$imm12 ) in
711 def SPILL_CARRY : CSKYPseudo<(outs), (ins CARRY:$cond, GPR:$rx, uimm12_2:$imm),
718 def RESTORE_CARRY : CSKYPseudo<(outs CARRY:$cond), (ins GPR:$rx, uimm12_2:$imm),
723 def STORE_PAIR : CSKYPseudo<(outs), (ins GPRPair:$rz, GPR:$rx, uimm12_2:$imm),
728 def LOAD_PAIR : CSKYPseudo<(outs GPRPair:$rz), (ins GPR:$rx, uimm12_2:$imm),
739 def CMPLEI32 : CSKYPseudo<(outs CARRY:$ca), (ins GPR:$rx, uimm16:$imm16),
768 (outs CARRY:$ca), (ins GPR:$rx), "tstnbz32", []>;
782 def BGENI : CSKYPseudo<(outs GPR:$dst), (ins uimm5:$imm), "bgeni\t$dst, $imm", []>;
789 def ISEL32 : CSKYPseudo<(outs GPR:$dst), (ins CARRY:$cond, GPR:$src1, GPR:$src2),
790 "!isel32\t$dst, $src1, src2", [(set GPR:$dst, (select CARRY:$cond, GPR:$src1, GPR:$src2))]>;
823 def JMP32 : I_16_JX<0x6, "jmp32", [(brind GPR:$rx)]>; // jmp to register
837 (outs GPR:$rx_u), (ins GPR:$rx, br_symbol:$imm16), "bnezad32\t$rx, $imm16", []> {
873 (outs GPR:$rz), (ins bare_symbol:$offset), []>;
877 (outs GPR:$rz), (ins data_symbol_b:$offset), []>;
879 (outs GPR:$rz), (ins data_symbol_h:$offset), []>;
881 (outs GPR:$rz), (ins data_symbol_w:$offset), []>;
883 (outs), (ins GPR:$rz, data_symbol_b:$offset), []>;
885 (outs), (ins GPR:$rz, data_symbol_h:$offset), []>;
887 (outs), (ins GPR:$rz, data_symbol_w:$offset), []>;
922 (outs GPR:$rd), (ins GPR:$rz, GPR:$rx, uimm12_2:$imm12), "stex32.w", []>;
946 (outs GPR:$rz), (ins GPR:$rx, uimm5:$imm5), []>;
948 (outs GPR:$rz), (ins GPR:$rx, uimm5:$imm5), []>;
956 (outs GPR:$rx), (ins), "mfcr\t$rx, fcr", []> {
969 (outs), (ins GPR:$rx), "mtcr\t$rx, fcr", []> {
1034 def CPRCR32 : I_CP_Z<0b0010, (outs GPR:$rz), (ins uimm5:$cpid, uimm12:$usdef), "cprcr32 $rz, <$cpid, ${usdef}>">;
1035 def CPRGR32 : I_CP_Z<0b0000, (outs GPR:$rz), (ins uimm5:$cpid, uimm12:$usdef), "cprgr32 $rz, <$cpid, ${usdef}>">;
1036 def CPWCR32 : I_CP_Z<0b0011, (outs), (ins GPR:$rz, uimm5:$cpid, uimm12:$usdef), "cpwcr32 $rz, <$cpid, ${usdef}>">;
1037 def CPWGR32 : I_CP_Z<0b0001, (outs), (ins GPR:$rz, uimm5:$cpid, uimm12:$usdef), "cpwgr32 $rz, <$cpid, ${usdef}>">;
1069 def PLDR32 :I_PLDR<AddrMode32WD, 0x36, 0b0110, (outs), (ins GPR:$rx, uimm12_2:$imm12), "pldr32", []>;
1070 def PLDW32 :I_PLDR<AddrMode32WD, 0x37, 0b0110, (outs), (ins GPR:$rx, uimm12_2:$imm12), "pldw32", []>;
1090 def : Pat<(Type (LoadOp GPR:$rs1)), (Inst GPR:$rs1, 0)>;
1092 def : Pat<(Type (LoadOp (add GPR:$rs1, imm_type:$uimm))),
1093 (Inst GPR:$rs1, imm_type:$uimm)>;
1098 def : Pat<(Type (LoadOp (add GPR:$rs1, tglobaladdr:$gd))),
1099 (Inst GPR:$rs1, tglobaladdr:$gd)>;
1115 def : Pat<(Type (LoadOp (add GPR:$rs1, GPR:$rs2))), (Inst GPR:$rs1, GPR:$rs2, 0)>;
1116 def : Pat<(Type (LoadOp (add GPR:$rs1, (shl GPR:$rs2, (i32 1))))), (Inst GPR:$rs1, GPR:$rs2, 1)>;
1117 def : Pat<(Type (LoadOp (add GPR:$rs1, (shl GPR:$rs2, (i32 2))))), (Inst GPR:$rs1, GPR:$rs2, 2)>;
1118 def : Pat<(Type (LoadOp (add GPR:$rs1, (shl GPR:$rs2, (i32 3))))), (Inst GPR:$rs1, GPR:$rs2, 3)>;
1132 def : Pat<(StoreOp Type:$rs2, GPR:$rs1), (Inst Type:$rs2, GPR:$rs1, 0)>;
1134 def : Pat<(StoreOp Type:$rs2, (add GPR:$rs1, imm_type:$uimm12)),
1135 (Inst Type:$rs2, GPR:$rs1, imm_type:$uimm12)>;
1147 def : Pat<(StoreOp Type:$rz, (add GPR:$rs1, GPR:$rs2)), (Inst Type:$rz, GPR:$rs1, GPR:$rs2, 0)>;
1148 def : Pat<(StoreOp Type:$rz, (add GPR:$rs1, (shl GPR:$rs2, (i32 1)))), (Inst Type:$rz, GPR:$rs1, GPR:$rs2, 1)>;
1149 def : Pat<(StoreOp Type:$rz, (add GPR:$rs1, (shl GPR:$rs2, (i32 2)))), (Inst Type:$rz, GPR:$rs1, GPR:$rs2, 2)>;
1150 def : Pat<(StoreOp Type:$rz, (add GPR:$rs1, (shl GPR:$rs2, (i32 3)))), (Inst Type:$rz, GPR:$rs1, GPR:$rs2, 3)>;
1159 def : Pat<(sext_inreg GPR:$src, i1), (SEXT32 GPR:$src, 0, 0)>;
1160 def : Pat<(and GPR:$src, 255), (ZEXT32 GPR:$src, 7, 0)>;
1161 def : Pat<(and GPR:$src, 65535), (ZEXT32 GPR:$src, 15, 0)>;
1169 def : Pat<(CSKY_CALLReg GPR:$src), (JSR32 GPR:$src)>;
1170 def : Pat<(CSKY_TAILReg GPR:$src), (JMP32 GPR:$src)>;
1196 def : Pat<(brcond (i32 (cond0 GPR:$rs1, uimm16:$rs2)), bb:$imm16),
1197 (BT32 (inst GPR:$rs1, imm_ty:$rs2), bb:$imm16)>;
1198 def : Pat<(brcond (i32 (cond1 GPR:$rs1, uimm16:$rs2)), bb:$imm16),
1199 (BF32 (inst GPR:$rs1, imm_ty:$rs2), bb:$imm16)>;
1206 def : Pat<(brcond (i32 (setne (and GPR:$rs, imm32_1_pop_bit:$im), 0)), bb:$imm16),
1207 (BT32 (BTSTI32 GPR:$rs, (imm32_1_pop_bit_XFORM imm32_1_pop_bit:$im)),
1209 def : Pat<(brcond (i32 (seteq (and GPR:$rs, imm32_1_pop_bit:$im), 0)), bb:$imm16),
1210 (BF32 (BTSTI32 GPR:$rs, (imm32_1_pop_bit_XFORM imm32_1_pop_bit:$im)),
1216 def : Pat<(brcond (i32 (setne GPR:$rs1, GPR:$rs2)), bb:$imm16),
1217 (BT32 (CMPNE32 GPR:$rs1, GPR:$rs2), bb:$imm16)>;
1218 def : Pat<(brcond (i32 (seteq GPR:$rs1, GPR:$rs2)), bb:$imm16),
1219 (BF32 (CMPNE32 GPR:$rs1, GPR:$rs2), bb:$imm16)>;
1223 def : Pat<(brcond (i32 (cond0 GPR:$rs1, GPR:$rs2)), bb:$imm16),
1224 (br (cmp GPR:$rs1, GPR:$rs2), bb:$imm16)>;
1225 def : Pat<(brcond (i32 (cond1 GPR:$rs1, GPR:$rs2)), bb:$imm16),
1226 (br (cmp GPR:$rs2, GPR:$rs1), bb:$imm16)>;
1234 def : Pat<(brcond (i32 (seteq GPR:$rs1, (i32 0))), bb:$imm16),
1235 (BEZ32 GPR:$rs1, bb:$imm16)>;
1236 def : Pat<(brcond (i32 (setne GPR:$rs1, (i32 0))), bb:$imm16),
1237 (BNEZ32 GPR:$rs1, bb:$imm16)>;
1238 def : Pat<(brcond (i32 (setlt GPR:$rs1, (i32 0))), bb:$imm16),
1239 (BLZ32 GPR:$rs1, bb:$imm16)>;
1240 def : Pat<(brcond (i32 (setlt GPR:$rs1, (i32 1))), bb:$imm16),
1241 (BLSZ32 GPR:$rs1, bb:$imm16)>;
1242 def : Pat<(brcond (i32 (setge GPR:$rs1, (i32 0))), bb:$imm16),
1243 (BHSZ32 GPR:$rs1, bb:$imm16)>;
1244 def : Pat<(brcond (i32 (setge GPR:$rs1, (i32 1))), bb:$imm16),
1245 (BHZ32 GPR:$rs1, bb:$imm16)>;
1246 def : Pat<(brcond (i32 (setgt GPR:$rs1, (i32 0))), bb:$imm16),
1247 (BHZ32 GPR:$rs1, bb:$imm16)>;
1248 def : Pat<(brcond (i32 (setgt GPR:$rs1, (i32 -1))), bb:$imm16),
1249 (BHSZ32 GPR:$rs1, bb:$imm16)>;
1250 def : Pat<(brcond (i32 (setle GPR:$rs1, (i32 0))), bb:$imm16),
1251 (BLSZ32 GPR:$rs1, bb:$imm16)>;
1252 def : Pat<(brcond (i32 (setle GPR:$rs1, (i32 -1))), bb:$imm16),
1253 (BLZ32 GPR:$rs1, bb:$imm16)>;
1258 def : Pat<(setne GPR:$rs1, GPR:$rs2),
1259 (CMPNE32 GPR:$rs1, GPR:$rs2)>;
1260 def : Pat<(setne (and GPR:$rs, imm32_1_pop_bit:$im), 0),
1261 (BTSTI32 GPR:$rs, (imm32_1_pop_bit_XFORM imm32_1_pop_bit:$im))>;
1262 def : Pat<(i32 (seteq GPR:$rs1, GPR:$rs2)),
1263 (MVCV32 (CMPNE32 GPR:$rs1, GPR:$rs2))>;
1264 def : Pat<(setuge GPR:$rs1, GPR:$rs2),
1265 (CMPHS32 GPR:$rs1, GPR:$rs2)>;
1266 def : Pat<(setule GPR:$rs1, GPR:$rs2),
1267 (CMPHS32 GPR:$rs2, GPR:$rs1)>;
1268 def : Pat<(i32 (setult GPR:$rs1, GPR:$rs2)),
1269 (MVCV32 (CMPHS32 GPR:$rs1, GPR:$rs2))>;
1270 def : Pat<(i32 (setugt GPR:$rs1, GPR:$rs2)),
1271 (MVCV32 (CMPHS32 GPR:$rs2, GPR:$rs1))>;
1272 def : Pat<(setlt GPR:$rs1, GPR:$rs2),
1273 (CMPLT32 GPR:$rs1, GPR:$rs2)>;
1274 def : Pat<(setgt GPR:$rs1, GPR:$rs2),
1275 (CMPLT32 GPR:$rs2, GPR:$rs1)>;
1276 def : Pat<(i32 (setge GPR:$rs1, GPR:$rs2)),
1277 (MVCV32 (CMPLT32 GPR:$rs1, GPR:$rs2))>;
1278 def : Pat<(i32 (setle GPR:$rs1, GPR:$rs2)),
1279 (MVCV32 (CMPLT32 GPR:$rs2, GPR:$rs1))>;
1283 def : Pat<(setne GPR:$rs1, uimm16:$rs2),
1284 (CMPNEI32 GPR:$rs1, uimm16:$rs2)>;
1286 def : Pat<(i32 (seteq GPR:$rs1, uimm16:$rs2)),
1287 (MVCV32 (CMPNEI32 GPR:$rs1, uimm16:$rs2))>;
1288 def : Pat<(setuge GPR:$rs1, oimm16:$rs2),
1289 (CMPHSI32 GPR:$rs1, oimm16:$rs2)>;
1291 def : Pat<(i32 (setult GPR:$rs1, oimm16:$rs2)),
1292 (MVCV32 (CMPHSI32 GPR:$rs1, oimm16:$rs2))>;
1293 def : Pat<(setlt GPR:$rs1, oimm16:$rs2),
1294 (CMPLTI32 GPR:$rs1, oimm16:$rs2)>;
1296 def : Pat<(i32 (setge GPR:$rs1, oimm16:$rs2)),
1297 (MVCV32 (CMPLTI32 GPR:$rs1, oimm16:$rs2))>;
1303 def : Pat<(select (i32 (setne GPR:$rs1, uimm16:$rs2)), (add GPR:$rx, uimm5:$imm), GPR:$false),
1304 (INCT32 (CMPNEI32 GPR:$rs1, uimm16:$rs2), GPR:$false, GPR:$rx, uimm5:$imm)>;
1305 def : Pat<(select (i32 (seteq GPR:$rs1, uimm16:$rs2)), (add GPR:$rx, uimm5:$imm), GPR:$false),
1306 (INCF32 (CMPNEI32 GPR:$rs1, uimm16:$rs2), GPR:$false, GPR:$rx, uimm5:$imm)>;
1307 def : Pat<(select (i32 (setne GPR:$rs1, uimm16:$rs2)), (add GPR:$rx, uimm5_neg:$imm), GPR:$false),
1308 (DECT32 (CMPNEI32 GPR:$rs1, uimm16:$rs2), GPR:$false, GPR:$rx,
1310 def : Pat<(select (i32 (seteq GPR:$rs1, uimm16:$rs2)), (add GPR:$rx, uimm5_neg:$imm), GPR:$false),
1311 (DECF32 (CMPNEI32 GPR:$rs1, uimm16:$rs2), GPR:$false, GPR:$rx,
1315 def : Pat<(select (i32 (cond0 GPR:$rs1, oimm16:$rs2)), (add GPR:$rx, uimm5:$imm), GPR:$other),
1316 (INCT32 (cmp GPR:$rs1, oimm16:$rs2), GPR:$other, GPR:$rx, uimm5:$imm)>;
1317 def : Pat<(select (i32 (cond1 GPR:$rs1, oimm16:$rs2)), (add GPR:$rx, uimm5:$imm), GPR:$other),
1318 (INCF32 (cmp GPR:$rs1, oimm16:$rs2), GPR:$other, GPR:$rx, uimm5:$imm)>;
1319 def : Pat<(select (i32 (cond0 GPR:$rs1, oimm16:$rs2)), GPR:$other, (add GPR:$rx, uimm5:$imm)),
1320 (INCF32 (cmp GPR:$rs1, oimm16:$rs2), GPR:$other, GPR:$rx, uimm5:$imm)>;
1321 def : Pat<(select (i32 (cond1 GPR:$rs1, oimm16:$rs2)), GPR:$other, (add GPR:$rx, uimm5:$imm)),
1322 (INCT32 (cmp GPR:$rs1, oimm16:$rs2), GPR:$other, GPR:$rx, uimm5:$imm)>;
1323 def : Pat<(select (i32 (cond0 GPR:$rs1, oimm16:$rs2)), (add GPR:$rx, uimm5_neg:$imm), GPR:$other),
1324 (DECT32 (cmp GPR:$rs1, oimm16:$rs2), GPR:$other, GPR:$rx,
1326 def : Pat<(select (i32 (cond1 GPR:$rs1, oimm16:$rs2)), (add GPR:$rx, uimm5_neg:$imm), GPR:$other),
1327 (DECF32 (cmp GPR:$rs1, oimm16:$rs2), GPR:$other, GPR:$rx,
1329 def : Pat<(select (i32 (cond0 GPR:$rs1, oimm16:$rs2)), GPR:$other, (add GPR:$rx, uimm5_neg:$imm)),
1330 (DECF32 (cmp GPR:$rs1, oimm16:$rs2), GPR:$other, GPR:$rx,
1332 def : Pat<(select (i32 (cond1 GPR:$rs1, oimm16:$rs2)), GPR:$other, (add GPR:$rx, uimm5_neg:$imm)),
1333 (DECT32 (cmp GPR:$rs1, oimm16:$rs2), GPR:$other, GPR:$rx,
1340 def : Pat<(select CARRY:$ca, (add GPR:$rx, uimm5:$imm), GPR:$other),
1341 (INCT32 CARRY:$ca, GPR:$other, GPR:$rx, uimm5:$imm)>;
1342 def : Pat<(select CARRY:$ca, GPR:$other, (add GPR:$rx, uimm5:$imm)),
1343 (INCF32 CARRY:$ca, GPR:$other, GPR:$rx, uimm5:$imm)>;
1344 def : Pat<(select (and CARRY:$ca, 1), (add GPR:$rx, uimm5:$imm), GPR:$other),
1345 (INCT32 CARRY:$ca, GPR:$other, GPR:$rx, uimm5:$imm)>;
1346 def : Pat<(select (and CARRY:$ca, 1), GPR:$other, (add GPR:$rx, uimm5:$imm)),
1347 (INCF32 CARRY:$ca, GPR:$other, GPR:$rx, uimm5:$imm)>;
1349 def : Pat<(select CARRY:$ca, (add GPR:$rx, uimm5_neg:$imm), GPR:$other),
1350 (DECT32 CARRY:$ca, GPR:$other, GPR:$rx, (imm_neg_XFORM uimm5_neg:$imm))>;
1351 def : Pat<(select CARRY:$ca, GPR:$other, (add GPR:$rx, uimm5_neg:$imm)),
1352 (DECF32 CARRY:$ca, GPR:$other, GPR:$rx, (imm_neg_XFORM uimm5_neg:$imm))>;
1353 def : Pat<(select (and CARRY:$ca, 1), (add GPR:$rx, uimm5_neg:$imm), GPR:$other),
1354 (DECT32 CARRY:$ca, GPR:$other, GPR:$rx, (imm_neg_XFORM uimm5_neg:$imm))>;
1355 def : Pat<(select (and CARRY:$ca, 1), GPR:$other, (add GPR:$rx, uimm5_neg:$imm)),
1356 (DECF32 CARRY:$ca, GPR:$other, GPR:$rx, (imm_neg_XFORM uimm5_neg:$imm))>;
1358 def : Pat<(select CARRY:$ca, GPR:$rx, GPR:$false),
1359 (MOVT32 CARRY:$ca, GPR:$rx, GPR:$false)>;
1360 def : Pat<(select (and CARRY:$ca, 1), GPR:$rx, GPR:$false),
1361 (MOVT32 CARRY:$ca, GPR:$rx, GPR:$false)>;
1364 def : Pat<(select (i32 (cond0 GPR:$rs1, imm_ty:$rs2)), GPR:$rx, GPR:$false),
1365 (MOVT32 (inst GPR:$rs1, imm_ty:$rs2), GPR:$rx, GPR:$false)>;
1366 def : Pat<(select (i32 (cond1 GPR:$rs1, imm_ty:$rs2)), GPR:$rx, GPR:$false),
1367 (MOVF32 (inst GPR:$rs1, imm_ty:$rs2), GPR:$rx, GPR:$false)>;
1374 def : Pat<(select CARRY:$ca, GPR:$rx, GPR:$false),
1375 (ISEL32 CARRY:$ca, GPR:$rx, GPR:$false)>;
1376 def : Pat<(select (and CARRY:$ca, 1), GPR:$rx, GPR:$false),
1377 (ISEL32 CARRY:$ca, GPR:$rx, GPR:$false)>;
1379 def : Pat<(select (i32 (setne (and GPR:$rs, imm32_1_pop_bit:$im), 0)),
1380 GPR:$true, GPR:$false),
1381 (MOVT32 (BTSTI32 GPR:$rs, (imm32_1_pop_bit_XFORM imm32_1_pop_bit:$im)),
1382 GPR:$true, GPR:$false)>;
1383 def : Pat<(select (i32 (seteq (and GPR:$rs, imm32_1_pop_bit:$im), 0)),
1384 GPR:$true, GPR:$false),
1385 (MOVF32 (BTSTI32 GPR:$rs, (imm32_1_pop_bit_XFORM imm32_1_pop_bit:$im)),
1386 GPR:$true, GPR:$false)>;
1390 def : Pat<(select (i32 (setne GPR:$rs1, GPR:$rs2)), (add GPR:$rx, uimm5:$imm), GPR:$false),
1391 (INCT32 (CMPNE32 GPR:$rs1, GPR:$rs2), GPR:$false, GPR:$rx, uimm5:$imm)>;
1392 def : Pat<(select (i32 (seteq GPR:$rs1, GPR:$rs2)), (add GPR:$rx, uimm5:$imm), GPR:$false),
1393 (INCF32 (CMPNE32 GPR:$rs1, GPR:$rs2), GPR:$false, GPR:$rx, uimm5:$imm)>;
1394 def : Pat<(select (i32 (setne GPR:$rs1, GPR:$rs2)), (add GPR:$rx, uimm5_neg:$imm), GPR:$false),
1395 (DECT32 (CMPNE32 GPR:$rs1, GPR:$rs2), GPR:$false, GPR:$rx,
1397 def : Pat<(select (i32 (seteq GPR:$rs1, GPR:$rs2)), (add GPR:$rx, uimm5_neg:$imm), GPR:$false),
1398 (DECF32 (CMPNE32 GPR:$rs1, GPR:$rs2), GPR:$false, GPR:$rx,
1402 def : Pat<(select (i32 (cond0 GPR:$rs1, GPR:$rs2)), (add GPR:$rx, uimm5:$imm), GPR:$other),
1403 (inc0 (cmp GPR:$rs1, GPR:$rs2), GPR:$other, GPR:$rx, uimm5:$imm)>;
1404 def : Pat<(select (i32 (cond0 GPR:$rs1, GPR:$rs2)), GPR:$other, (add GPR:$rx, uimm5:$imm)),
1405 (inc1 (cmp GPR:$rs1, GPR:$rs2), GPR:$other, GPR:$rx, uimm5:$imm)>;
1406 def : Pat<(select (i32 (cond1 GPR:$rs1, GPR:$rs2)), (add GPR:$rx, uimm5:$imm), GPR:$other),
1407 (inc0 (cmp GPR:$rs2, GPR:$rs1), GPR:$other, GPR:$rx, uimm5:$imm)>;
1408 def : Pat<(select (i32 (cond1 GPR:$rs1, GPR:$rs2)), GPR:$other, (add GPR:$rx, uimm5:$imm)),
1409 (inc1 (cmp GPR:$rs2, GPR:$rs1), GPR:$other, GPR:$rx, uimm5:$imm)>;
1418 def : Pat<(select (i32 (cond0 GPR:$rs1, GPR:$rs2)), (add GPR:$rx, uimm5_neg:$imm), GPR:$other),
1419 (dec0 (cmp GPR:$rs1, GPR:$rs2), GPR:$other, GPR:$rx,
1421 def : Pat<(select (i32 (cond0 GPR:$rs1, GPR:$rs2)), GPR:$other, (add GPR:$rx, uimm5_neg:$imm)),
1422 (dec1 (cmp GPR:$rs1, GPR:$rs2), GPR:$other, GPR:$rx,
1424 def : Pat<(select (i32 (cond1 GPR:$rs1, GPR:$rs2)), (add GPR:$rx, uimm5_neg:$imm), GPR:$other),
1425 (dec0 (cmp GPR:$rs2, GPR:$rs1), GPR:$other, GPR:$rx,
1427 def : Pat<(select (i32 (cond1 GPR:$rs1, GPR:$rs2)), GPR:$other, (add GPR:$rx, uimm5_neg:$imm)),
1428 (dec1 (cmp GPR:$rs2, GPR:$rs1), GPR:$other, GPR:$rx,
1437 def : Pat<(select (i32 (setne GPR:$rs1, GPR:$rs2)), GPR:$rx, GPR:$false),
1438 (MOVT32 (CMPNE32 GPR:$rs1, GPR:$rs2), GPR:$rx, GPR:$false)>;
1439 def : Pat<(select (i32 (seteq GPR:$rs1, GPR:$rs2)), GPR:$rx, GPR:$false),
1440 (MOVF32 (CMPNE32 GPR:$rs1, GPR:$rs2), GPR:$rx, GPR:$false)>;
1444 def : Pat<(select (i32 (cond0 GPR:$rs1, GPR:$rs2)), GPR:$rx, GPR:$false),
1445 (mov_inst (cmp_inst GPR:$rs1, GPR:$rs2), GPR:$rx, GPR:$false)>;
1446 def : Pat<(select (i32 (cond1 GPR:$rs1, GPR:$rs2)), GPR:$rx, GPR:$false),
1447 (mov_inst (cmp_inst GPR:$rs2, GPR:$rs1), GPR:$rx, GPR:$false)>;
1455 def : Pat<(select CARRY:$ca, (i32 0), GPR:$other),
1456 (CLRT32 CARRY:$ca, GPR:$other)>;
1457 def : Pat<(select CARRY:$ca, GPR:$other, (i32 0)),
1458 (CLRF32 CARRY:$ca, GPR:$other)>;
1468 def : Pat<(or GPR:$rs, imm32_1_pop_bit:$imm),
1469 (BSETI32 GPR:$rs, (imm32_1_pop_bit_XFORM imm32_1_pop_bit:$imm))>;
1470 def : Pat<(and GPR:$rs, imm32_1_zero_bit:$imm),
1471 (BCLRI32 GPR:$rs, (imm32_1_zero_bit_XFORM imm32_1_zero_bit:$imm))>;
1476 def : Pat<(rotl GPR:$rs1, GPR:$rs2),
1477 (ROTL32 GPR:$rs1, (ANDI32 GPR:$rs2, 0x1f))>;
1479 def : Pat<(bitreverse GPR:$rx), (BREV32 GPR:$rx)>;
1480 def : Pat<(bswap GPR:$rx), (REVB32 GPR:$rx)>;
1481 def : Pat<(i32 (cttz GPR:$rx)), (FF1 (BREV32 GPR:$rx))>;
1483 def : Pat<(i32 (ctlz GPR:$rx)), (FF1 GPR:$rx)>;
1535 def PseudoLRW32 : CSKYPseudo<(outs GPR:$rz), (ins bare_symbol:$src), "lrw32 $rz, $src", []>;
1544 def PseudoTLSLA32 : CSKYPseudo<(outs GPR:$dst1, GPR:$dst2),