• Home
  • Raw
  • Download

Lines Matching refs:rA

477 // fsmb: Form select mask for bytes. N.B. Input operand, $rA, is 16-bits
479 RRForm_1<0b01101101100, OOL, IOL, "fsmb\t$rT, $rA", SelectOp,
483 FSMBInst<(outs VECREG:$rT), (ins rclass:$rA),
484 [(set (vectype VECREG:$rT), (SPUselmask rclass:$rA))]>;
487 FSMBInst<(outs VECREG:$rT), (ins VECREG:$rA),
489 (SPUselmask (vectype VECREG:$rA)))]>;
498 // fsmh: Form select mask for halfwords. N.B., Input operand, $rA, is
502 RRForm_1<0b10101101100, OOL, IOL, "fsmh\t$rT, $rA", SelectOp,
506 FSMHInst<(outs VECREG:$rT), (ins rclass:$rA),
507 [(set (vectype VECREG:$rT), (SPUselmask rclass:$rA))]>;
510 FSMHInst<(outs VECREG:$rT), (ins VECREG:$rA),
512 (SPUselmask (vectype VECREG:$rA)))]>;
522 // only the lower 4 bits of $rA are significant.
525 RRForm_1<0b00101101100, OOL, IOL, "fsm\t$rT, $rA", SelectOp,
529 FSMInst<(outs VECREG:$rT), (ins rclass:$rA),
530 [(set (vectype VECREG:$rT), (SPUselmask rclass:$rA))]>;
533 FSMInst<(outs VECREG:$rT), (ins VECREG:$rA),
534 [(set (vectype VECREG:$rT), (SPUselmask (vectype VECREG:$rA)))]>;
558 RRForm<0b00010011000, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
559 "ah\t$rT, $rA, $rB", IntegerOp,
560 [(set (v8i16 VECREG:$rT), (int_spu_si_ah VECREG:$rA, VECREG:$rB))]>;
562 def : Pat<(add (v8i16 VECREG:$rA), (v8i16 VECREG:$rB)),
563 (AHv8i16 VECREG:$rA, VECREG:$rB)>;
566 RRForm<0b00010011000, (outs R16C:$rT), (ins R16C:$rA, R16C:$rB),
567 "ah\t$rT, $rA, $rB", IntegerOp,
568 [(set R16C:$rT, (add R16C:$rA, R16C:$rB))]>;
571 RI10Form<0b10111000, (outs VECREG:$rT), (ins VECREG:$rA, s10imm:$val),
572 "ahi\t$rT, $rA, $val", IntegerOp,
573 [(set (v8i16 VECREG:$rT), (add (v8i16 VECREG:$rA),
577 RI10Form<0b10111000, (outs R16C:$rT), (ins R16C:$rA, s10imm:$val),
578 "ahi\t$rT, $rA, $val", IntegerOp,
579 [(set R16C:$rT, (add R16C:$rA, i16ImmSExt10:$val))]>;
585 "a\t$rT, $rA, $rB", IntegerOp,
589 AInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
590 [(set (vectype VECREG:$rT), (add (vectype VECREG:$rA),
594 AInst<(outs rclass:$rT), (ins rclass:$rA, rclass:$rB),
595 [(set rclass:$rT, (add rclass:$rA, rclass:$rB))]>;
607 "ai\t$rT, $rA, $val", IntegerOp,
611 AIInst<(outs VECREG:$rT), (ins VECREG:$rA, s10imm:$val),
612 [(set (vectype VECREG:$rT), (add (vectype VECREG:$rA), immpred:$val))]>;
615 AIInst<(outs VECREG:$rT), (ins VECREG:$rA, s10imm:$val),
619 AIInst<(outs rclass:$rT), (ins rclass:$rA, s10imm_i32:$val),
620 [(set rclass:$rT, (add rclass:$rA, immpred:$val))]>;
624 AIInst<(outs rclass:$rT), (ins rclass:$rA, s10imm_i32:$val),
639 RRForm<0b00010010000, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
640 "sfh\t$rT, $rA, $rB", IntegerOp,
641 [(set (v8i16 VECREG:$rT), (sub (v8i16 VECREG:$rA),
645 RRForm<0b00010010000, (outs R16C:$rT), (ins R16C:$rA, R16C:$rB),
646 "sfh\t$rT, $rA, $rB", IntegerOp,
647 [(set R16C:$rT, (sub R16C:$rB, R16C:$rA))]>;
650 RI10Form<0b10110000, (outs VECREG:$rT), (ins VECREG:$rA, s10imm:$val),
651 "sfhi\t$rT, $rA, $val", IntegerOp,
653 (v8i16 VECREG:$rA)))]>;
655 def SFHIr16 : RI10Form<0b10110000, (outs R16C:$rT), (ins R16C:$rA, s10imm:$val),
656 "sfhi\t$rT, $rA, $val", IntegerOp,
657 [(set R16C:$rT, (sub i16ImmSExt10:$val, R16C:$rA))]>;
660 (ins VECREG:$rA, VECREG:$rB),
661 "sf\t$rT, $rA, $rB", IntegerOp,
662 [(set (v4i32 VECREG:$rT), (sub (v4i32 VECREG:$rB), (v4i32 VECREG:$rA)))]>;
665 def SFr32 : RRForm<0b00000010000, (outs R32C:$rT), (ins R32C:$rA, R32C:$rB),
666 "sf\t$rT, $rA, $rB", IntegerOp,
667 [(set R32C:$rT, (sub R32C:$rB, R32C:$rA))]>;
670 RI10Form<0b00110000, (outs VECREG:$rT), (ins VECREG:$rA, s10imm:$val),
671 "sfi\t$rT, $rA, $val", IntegerOp,
673 (v4i32 VECREG:$rA)))]>;
676 (ins R32C:$rA, s10imm_i32:$val),
677 "sfi\t$rT, $rA, $val", IntegerOp,
678 [(set R32C:$rT, (sub i32ImmSExt10:$val, R32C:$rA))]>;
683 "addx\t$rT, $rA, $rB",
688 (ins VECREG:$rA, VECREG:$rB, VECREG:$rCarry),
695 (ins rclass:$rA, rclass:$rB, rclass:$rCarry),
712 "cg\t$rT, $rA, $rB",
717 (ins VECREG:$rA, VECREG:$rB),
722 (ins rclass:$rA, rclass:$rB),
738 "sfx\t$rT, $rA, $rB",
743 (ins VECREG:$rA, VECREG:$rB, VECREG:$rCarry),
750 (ins rclass:$rA, rclass:$rB, rclass:$rCarry),
767 "bg\t$rT, $rA, $rB",
772 (ins VECREG:$rA, VECREG:$rB),
777 (ins rclass:$rA, rclass:$rB),
791 RRForm<0b11000010110, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB,
793 "bgx\t$rT, $rA, $rB", IntegerOp,
802 RRForm<0b00100011110, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
803 "mpy\t$rT, $rA, $rB", IntegerMulDiv,
807 RRForm<0b00100011110, (outs R16C:$rT), (ins R16C:$rA, R16C:$rB),
808 "mpy\t$rT, $rA, $rB", IntegerMulDiv,
809 [(set R16C:$rT, (mul R16C:$rA, R16C:$rB))]>;
815 "mpyu\t$rT, $rA, $rB", IntegerMulDiv,
819 MPYUInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
823 MPYUInst<(outs R32C:$rT), (ins R16C:$rA, R16C:$rB),
824 [(set R32C:$rT, (mul (zext R16C:$rA), (zext R16C:$rB)))]>;
827 MPYUInst<(outs R32C:$rT), (ins R32C:$rA, R32C:$rB),
834 "mpyi\t$rT, $rA, $val", IntegerMulDiv,
838 MPYIInst<(outs VECREG:$rT), (ins VECREG:$rA, s10imm:$val),
840 (mul (v8i16 VECREG:$rA), v8i16SExt10Imm:$val))]>;
843 MPYIInst<(outs R16C:$rT), (ins R16C:$rA, s10imm:$val),
844 [(set R16C:$rT, (mul R16C:$rA, i16ImmSExt10:$val))]>;
851 "mpyui\t$rT, $rA, $val", IntegerMulDiv,
855 MPYUIInst<(outs VECREG:$rT), (ins VECREG:$rA, s10imm:$val),
859 MPYUIInst<(outs R16C:$rT), (ins R16C:$rA, s10imm:$val),
865 "mpya\t$rT, $rA, $rB, $rC", IntegerMulDiv,
869 MPYAInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB, VECREG:$rC),
871 (add (v4i32 (bitconvert (mul (v8i16 VECREG:$rA),
876 MPYAInst<(outs R32C:$rT), (ins R16C:$rA, R16C:$rB, R32C:$rC),
877 [(set R32C:$rT, (add (sext (mul R16C:$rA, R16C:$rB)),
881 MPYAInst<(outs R32C:$rT), (ins R16C:$rA, R16C:$rB, R32C:$rC),
882 [(set R32C:$rT, (add (mul (sext R16C:$rA), (sext R16C:$rB)),
886 MPYAInst<(outs R32C:$rT), (ins R32C:$rA, R32C:$rB, R32C:$rC),
887 [(set R32C:$rT, (add (mul (sext_inreg R32C:$rA, i16),
894 "mpyh\t$rT, $rA, $rB", IntegerMulDiv,
898 MPYHInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
902 MPYHInst<(outs R32C:$rT), (ins R32C:$rA, R32C:$rB),
910 "mpys\t$rT, $rA, $rB", IntegerMulDiv,
914 MPYSInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB)>;
917 MPYSInst<(outs R32C:$rT), (ins R16C:$rA, R16C:$rB)>;
920 // the top 16 bits of the $rA, $rB)
924 "mpyhh\t$rT, $rA, $rB", IntegerMulDiv,
928 MPYHHInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB)>;
931 MPYHHInst<(outs R32C:$rT), (ins R32C:$rA, R32C:$rB)>;
937 "mpyhha\t$rT, $rA, $rB", IntegerMulDiv,
941 MPYHHAInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB)>;
944 MPYHHAInst<(outs R32C:$rT), (ins R32C:$rA, R32C:$rB)>;
956 "mpyhhu\t$rT, $rA, $rB", IntegerMulDiv,
960 MPYHHUInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB)>;
963 MPYHHUInst<(outs R32C:$rT), (ins R32C:$rA, R32C:$rB)>;
969 "mpyhhau\t$rT, $rA, $rB", IntegerMulDiv,
973 MPYHHAUInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB)>;
976 MPYHHAUInst<(outs R32C:$rT), (ins R32C:$rA, R32C:$rB)>;
982 RRForm_1<0b10100101010, OOL, IOL, "clz\t$rT, $rA",
986 CLZInst<(outs rclass:$rT), (ins rclass:$rA),
987 [(set rclass:$rT, (ctlz rclass:$rA))]>;
990 CLZInst<(outs VECREG:$rT), (ins VECREG:$rA),
991 [(set (vectype VECREG:$rT), (ctlz (vectype VECREG:$rA)))]>;
1007 RRForm_1<0b00101101010, (outs VECREG:$rT), (ins VECREG:$rA),
1008 "cntb\t$rT, $rA", IntegerOp,
1009 [(set (v16i8 VECREG:$rT), (SPUcntb (v16i8 VECREG:$rA)))]>;
1012 RRForm_1<0b00101101010, (outs VECREG:$rT), (ins VECREG:$rA),
1013 "cntb\t$rT, $rA", IntegerOp,
1014 [(set (v8i16 VECREG:$rT), (SPUcntb (v8i16 VECREG:$rA)))]>;
1017 RRForm_1<0b00101101010, (outs VECREG:$rT), (ins VECREG:$rA),
1018 "cntb\t$rT, $rA", IntegerOp,
1019 [(set (v4i32 VECREG:$rT), (SPUcntb (v4i32 VECREG:$rA)))]>;
1021 // gbb: Gather the low order bits from each byte in $rA into a single 16-bit
1032 RRForm_1<0b01001101100, OOL, IOL, "gbb\t$rT, $rA", GatherOp, pattern>;
1035 GBBInst<(outs rclass:$rT), (ins VECREG:$rA),
1039 GBBInst<(outs VECREG:$rT), (ins VECREG:$rA),
1050 // gbh: Gather all low order bits from each halfword in $rA into a single
1057 RRForm_1<0b10001101100, OOL, IOL, "gbh\t$rT, $rA", GatherOp,
1061 GBHInst<(outs rclass:$rT), (ins VECREG:$rA),
1065 GBHInst<(outs VECREG:$rT), (ins VECREG:$rA),
1076 // gb: Gather all low order bits from each word in $rA into a single
1083 RRForm_1<0b00001101100, OOL, IOL, "gb\t$rT, $rA", GatherOp,
1087 GBInst<(outs rclass:$rT), (ins VECREG:$rA),
1091 GBInst<(outs VECREG:$rT), (ins VECREG:$rA),
1104 RRForm<0b11001011000, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1105 "avgb\t$rT, $rA, $rB", ByteOp,
1110 RRForm<0b11001010000, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1111 "absdb\t$rT, $rA, $rB", ByteOp,
1116 RRForm<0b11001010010, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1117 "sumb\t$rT, $rA, $rB", ByteOp,
1211 RRForm<0b10000011000, OOL, IOL, "and\t$rT, $rA, $rB",
1215 ANDInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1216 [(set (vectype VECREG:$rT), (and (vectype VECREG:$rA),
1220 ANDInst<(outs rclass:$rT), (ins rclass:$rA, rclass:$rB),
1221 [(set rclass:$rT, (and rclass:$rA, rclass:$rB))]>;
1238 def fabs32: ANDInst<(outs R32FP:$rT), (ins R32FP:$rA, R32C:$rB),
1241 def fabs64: ANDInst<(outs R64FP:$rT), (ins R64FP:$rA, R64C:$rB),
1244 def fabsvec: ANDInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1255 def i16i32: ANDInst<(outs R32C:$rT), (ins R16C:$rA, R32C:$rB),
1256 [(set R32C:$rT, (and (zext R16C:$rA), R32C:$rB))]>;
1272 RRForm<0b10000011010, OOL, IOL, "andc\t$rT, $rA, $rB",
1276 ANDCInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1278 (and (vectype VECREG:$rA),
1282 ANDCInst<(outs rclass:$rT), (ins rclass:$rA, rclass:$rB),
1283 [(set rclass:$rT, (and rclass:$rA, (not rclass:$rB)))]>;
1305 RI10Form<0b01101000, OOL, IOL, "andbi\t$rT, $rA, $val",
1310 def v16i8: ANDBIInst<(outs VECREG:$rT), (ins VECREG:$rA, u10imm:$val),
1312 (and (v16i8 VECREG:$rA),
1315 def r8: ANDBIInst<(outs R8C:$rT), (ins R8C:$rA, u10imm_i8:$val),
1316 [(set R8C:$rT, (and R8C:$rA, immU8:$val))]>;
1322 RI10Form<0b10101000, OOL, IOL, "andhi\t$rT, $rA, $val",
1327 def v8i16: ANDHIInst<(outs VECREG:$rT), (ins VECREG:$rA, s10imm:$val),
1329 (and (v8i16 VECREG:$rA), v8i16SExt10Imm:$val))]>;
1331 def r16: ANDHIInst<(outs R16C:$rT), (ins R16C:$rA, u10imm:$val),
1332 [(set R16C:$rT, (and R16C:$rA, i16ImmUns10:$val))]>;
1335 def i8i16: ANDHIInst<(outs R16C:$rT), (ins R8C:$rA, u10imm:$val),
1336 [(set R16C:$rT, (and (zext R8C:$rA), i16ImmUns10:$val))]>;
1342 RI10Form<0b00101000, OOL, IOL, "andi\t$rT, $rA, $val",
1347 def v4i32: ANDIInst<(outs VECREG:$rT), (ins VECREG:$rA, s10imm:$val),
1349 (and (v4i32 VECREG:$rA), v4i32SExt10Imm:$val))]>;
1351 def r32: ANDIInst<(outs R32C:$rT), (ins R32C:$rA, s10imm_i32:$val),
1352 [(set R32C:$rT, (and R32C:$rA, i32ImmSExt10:$val))]>;
1356 def i8i32: ANDIInst<(outs R32C:$rT), (ins R8C:$rA, s10imm_i32:$val),
1358 (and (zext R8C:$rA), i32ImmSExt10:$val))]>;
1365 def i16i32: ANDIInst<(outs R32C:$rT), (ins R16C:$rA, s10imm_i32:$val),
1367 (and (zext R16C:$rA), i32ImmSExt10:$val))]>;
1378 RRForm<0b10000010000, OOL, IOL, "or\t$rT, $rA, $rB",
1382 ORInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1383 [(set (vectype VECREG:$rT), (or (vectype VECREG:$rA),
1387 ORInst<(outs rclass:$rT), (ins rclass:$rA, rclass:$rB),
1388 [(set rclass:$rT, (or rclass:$rA, rclass:$rB))]>;
1398 def v4f32: ORInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1400 (v4f32 (bitconvert (or (v4i32 VECREG:$rA),
1403 def v2f64: ORInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1405 (v2f64 (bitconvert (or (v2i64 VECREG:$rA),
1415 def f32: ORInst<(outs R32FP:$rT), (ins R32FP:$rA, R32FP:$rB),
1418 def f64: ORInst<(outs R64FP:$rT), (ins R64FP:$rA, R64FP:$rB),
1427 def : Pat<(v16i8 (SPUprefslot2vec R8C:$rA)),
1428 (COPY_TO_REGCLASS R8C:$rA, VECREG)>;
1430 def : Pat<(v8i16 (SPUprefslot2vec R16C:$rA)),
1431 (COPY_TO_REGCLASS R16C:$rA, VECREG)>;
1433 def : Pat<(v4i32 (SPUprefslot2vec R32C:$rA)),
1434 (COPY_TO_REGCLASS R32C:$rA, VECREG)>;
1436 def : Pat<(v2i64 (SPUprefslot2vec R64C:$rA)),
1437 (COPY_TO_REGCLASS R64C:$rA, VECREG)>;
1439 def : Pat<(v4f32 (SPUprefslot2vec R32FP:$rA)),
1440 (COPY_TO_REGCLASS R32FP:$rA, VECREG)>;
1442 def : Pat<(v2f64 (SPUprefslot2vec R64FP:$rA)),
1443 (COPY_TO_REGCLASS R64FP:$rA, VECREG)>;
1445 def : Pat<(i8 (SPUvec2prefslot (v16i8 VECREG:$rA))),
1446 (COPY_TO_REGCLASS (v16i8 VECREG:$rA), R8C)>;
1448 def : Pat<(i16 (SPUvec2prefslot (v8i16 VECREG:$rA))),
1449 (COPY_TO_REGCLASS (v8i16 VECREG:$rA), R16C)>;
1451 def : Pat<(i32 (SPUvec2prefslot (v4i32 VECREG:$rA))),
1452 (COPY_TO_REGCLASS (v4i32 VECREG:$rA), R32C)>;
1454 def : Pat<(i64 (SPUvec2prefslot (v2i64 VECREG:$rA))),
1455 (COPY_TO_REGCLASS (v2i64 VECREG:$rA), R64C)>;
1457 def : Pat<(f32 (SPUvec2prefslot (v4f32 VECREG:$rA))),
1458 (COPY_TO_REGCLASS (v4f32 VECREG:$rA), R32FP)>;
1460 def : Pat<(f64 (SPUvec2prefslot (v2f64 VECREG:$rA))),
1461 (COPY_TO_REGCLASS (v2f64 VECREG:$rA), R64FP)>;
1469 : SPUInstr<OOL, IOL, "lr\t$rT, $rA", IntegerOp> {
1482 LRInst<(outs VECREG:$rT), (ins VECREG:$rA)>;
1485 LRInst<(outs rclass:$rT), (ins rclass:$rA)>;
1510 RRForm<0b10010010000, OOL, IOL, "orc\t$rT, $rA, $rB",
1514 ORCInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1515 [(set (vectype VECREG:$rT), (or (vectype VECREG:$rA),
1519 ORCInst<(outs rclass:$rT), (ins rclass:$rA, rclass:$rB),
1520 [(set rclass:$rT, (or rclass:$rA, (not rclass:$rB)))]>;
1540 RI10Form<0b01100000, OOL, IOL, "orbi\t$rT, $rA, $val",
1544 ORBIInst<(outs VECREG:$rT), (ins VECREG:$rA, u10imm:$val),
1545 [(set (v16i8 VECREG:$rT), (or (vectype VECREG:$rA),
1552 def r8: ORBIInst<(outs R8C:$rT), (ins R8C:$rA, u10imm_i8:$val),
1553 [(set R8C:$rT, (or R8C:$rA, immU8:$val))]>;
1560 RI10Form<0b10100000, OOL, IOL, "orhi\t$rT, $rA, $val",
1564 ORHIInst<(outs VECREG:$rT), (ins VECREG:$rA, u10imm:$val),
1565 [(set (vectype VECREG:$rT), (or (vectype VECREG:$rA),
1572 def r16: ORHIInst<(outs R16C:$rT), (ins R16C:$rA, u10imm:$val),
1573 [(set R16C:$rT, (or R16C:$rA, i16ImmUns10:$val))]>;
1576 def i8i16: ORHIInst<(outs R16C:$rT), (ins R8C:$rA, s10imm:$val),
1577 [(set R16C:$rT, (or (anyext R8C:$rA),
1584 RI10Form<0b00100000, OOL, IOL, "ori\t$rT, $rA, $val",
1588 ORIInst<(outs VECREG:$rT), (ins VECREG:$rA, u10imm:$val),
1589 [(set (vectype VECREG:$rT), (or (vectype VECREG:$rA),
1597 def r32: ORIInst<(outs R32C:$rT), (ins R32C:$rA, s10imm_i32:$val),
1598 [(set R32C:$rT, (or R32C:$rA, i32ImmSExt10:$val))]>;
1603 def i16i32: ORIInst<(outs R32C:$rT), (ins R16C:$rA, s10imm_i32:$val),
1604 [(set R32C:$rT, (or (anyext R16C:$rA),
1610 def i8i32: ORIInst<(outs R32C:$rT), (ins R8C:$rA, s10imm_i32:$val),
1611 [(set R32C:$rT, (or (anyext R8C:$rA),
1617 // ORX: "or" across the vector: or's $rA's word slots leaving the result in
1622 RRForm<0b10010010000, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1623 "orx\t$rT, $rA, $rB", IntegerOp,
1629 RRForm<0b10010010000, OOL, IOL, "xor\t$rT, $rA, $rB",
1633 XORInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1634 [(set (vectype VECREG:$rT), (xor (vectype VECREG:$rA),
1638 XORInst<(outs rclass:$rT), (ins rclass:$rA, rclass:$rB),
1639 [(set rclass:$rT, (xor rclass:$rA, rclass:$rB))]>;
1656 def fneg32: XORInst<(outs R32FP:$rT), (ins R32FP:$rA, R32C:$rB),
1659 def fneg64: XORInst<(outs R64FP:$rT), (ins R64FP:$rA, R64C:$rB),
1662 def fnegvec: XORInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1671 RI10Form<0b01100000, OOL, IOL, "xorbi\t$rT, $rA, $val",
1677 XORBIInst<(outs VECREG:$rT), (ins VECREG:$rA, u10imm:$val),
1678 [(set (v16i8 VECREG:$rT), (xor (v16i8 VECREG:$rA), v16i8U8Imm:$val))]>;
1681 XORBIInst<(outs R8C:$rT), (ins R8C:$rA, u10imm_i8:$val),
1682 [(set R8C:$rT, (xor R8C:$rA, immU8:$val))]>;
1688 RI10Form<0b10100000, (outs VECREG:$rT), (ins VECREG:$rA, u10imm:$val),
1689 "xorhi\t$rT, $rA, $val", IntegerOp,
1690 [(set (v8i16 VECREG:$rT), (xor (v8i16 VECREG:$rA),
1694 RI10Form<0b10100000, (outs R16C:$rT), (ins R16C:$rA, s10imm:$val),
1695 "xorhi\t$rT, $rA, $val", IntegerOp,
1696 [(set R16C:$rT, (xor R16C:$rA, i16ImmSExt10:$val))]>;
1699 RI10Form<0b00100000, (outs VECREG:$rT), (ins VECREG:$rA, s10imm_i32:$val),
1700 "xori\t$rT, $rA, $val", IntegerOp,
1701 [(set (v4i32 VECREG:$rT), (xor (v4i32 VECREG:$rA),
1705 RI10Form<0b00100000, (outs R32C:$rT), (ins R32C:$rA, s10imm_i32:$val),
1706 "xori\t$rT, $rA, $val", IntegerOp,
1707 [(set R32C:$rT, (xor R32C:$rA, i32ImmSExt10:$val))]>;
1712 RRForm<0b10010011000, OOL, IOL, "nand\t$rT, $rA, $rB",
1716 NANDInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1717 [(set (vectype VECREG:$rT), (vnot (and (vectype VECREG:$rA),
1720 NANDInst<(outs rclass:$rT), (ins rclass:$rA, rclass:$rB),
1721 [(set rclass:$rT, (not (and rclass:$rA, rclass:$rB)))]>;
1742 RRForm<0b10010010000, OOL, IOL, "nor\t$rT, $rA, $rB",
1746 NORInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1747 [(set (vectype VECREG:$rT), (vnot (or (vectype VECREG:$rA),
1750 NORInst<(outs rclass:$rT), (ins rclass:$rA, rclass:$rB),
1751 [(set rclass:$rT, (not (or rclass:$rA, rclass:$rB)))]>;
1771 RRRForm<0b1000, OOL, IOL, "selb\t$rT, $rA, $rB, $rC",
1775 SELBInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB, VECREG:$rC),
1779 (vectype VECREG:$rA))))]>;
1782 SELBInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB, VECREG:$rC),
1786 (vectype VECREG:$rA)))]>;
1789 SELBInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB, R32C:$rC),
1793 (vectype VECREG:$rA)))]>;
1796 SELBInst<(outs rclass:$rT), (ins rclass:$rA, rclass:$rB, rclass:$rC),
1799 (and rclass:$rA, (not rclass:$rC))))]>;
1802 SELBInst<(outs rclass:$rT), (ins rclass:$rA, rclass:$rB, rcond:$rC),
1804 (select rcond:$rC, rclass:$rB, rclass:$rA))]>;
1830 SELBInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB, VECREG:$rC),
1834 (v4f32 VECREG:$rA)))]>;
1846 Pat<(SPUselb (vectype VECREG:$rA), (vectype VECREG:$rB), (vectype VECREG:$rC)),
1847 (inst VECREG:$rA, VECREG:$rB, VECREG:$rC)>;
1855 Pat<(SPUselb rclass:$rA, rclass:$rB, rclass:$rC),
1856 (inst rclass:$rA, rclass:$rB, rclass:$rC)>;
1869 RRForm<0b10010010000, OOL, IOL, "eqv\t$rT, $rA, $rB",
1873 EQVInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1875 (or (and (vectype VECREG:$rA), (vectype VECREG:$rB)),
1876 (and (vnot (vectype VECREG:$rA)),
1880 EQVInst<(outs rclass:$rT), (ins rclass:$rA, rclass:$rB),
1881 [(set rclass:$rT, (or (and rclass:$rA, rclass:$rB),
1882 (and (not rclass:$rA), (not rclass:$rB))))]>;
1885 EQVInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1887 (xor (vectype VECREG:$rA), (vnot (vectype VECREG:$rB))))]>;
1890 EQVInst<(outs rclass:$rT), (ins rclass:$rA, rclass:$rB),
1891 [(set rclass:$rT, (xor rclass:$rA, (not rclass:$rB)))]>;
1894 EQVInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1896 (or (and (vectype VECREG:$rA), (vectype VECREG:$rB)),
1897 (vnot (or (vectype VECREG:$rA), (vectype VECREG:$rB)))))]>;
1900 EQVInst<(outs rclass:$rT), (ins rclass:$rA, rclass:$rB),
1902 (or (and rclass:$rA, rclass:$rB),
1903 (not (or rclass:$rA, rclass:$rB))))]>;
1906 EQVInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
1908 (not (xor (vectype VECREG:$rA), (vectype VECREG:$rB))))]>;
1911 EQVInst<(outs rclass:$rT), (ins rclass:$rA, rclass:$rB),
1912 [(set rclass:$rT, (not (xor rclass:$rA, rclass:$rB)))]>;
1973 RRRForm<0b1000, OOL, IOL, "shufb\t$rT, $rA, $rB, $rC",
1977 SHUFBInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB, VECREG:$rC),
1979 (SPUshuffle (resultvec VECREG:$rA),
1984 SHUFBInst<(outs VECREG:$rT), (ins GPRC:$rA, GPRC:$rB, VECREG:$rC),
2014 RRForm<0b11111010000, OOL, IOL, "shlh\t$rT, $rA, $rB",
2018 SHLHInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
2020 (SPUvec_shl (vectype VECREG:$rA), (vectype VECREG:$rB)))]>;
2025 def r16: SHLHInst<(outs R16C:$rT), (ins R16C:$rA, R16C:$rB),
2026 [(set R16C:$rT, (shl R16C:$rA, R16C:$rB))]>;
2027 def r16_r32: SHLHInst<(outs R16C:$rT), (ins R16C:$rA, R32C:$rB),
2028 [(set R16C:$rT, (shl R16C:$rA, R32C:$rB))]>;
2036 RI7Form<0b11111010000, OOL, IOL, "shlhi\t$rT, $rA, $val",
2040 SHLHIInst<(outs VECREG:$rT), (ins VECREG:$rA, u7imm:$val),
2042 (SPUvec_shl (vectype VECREG:$rA), (i16 uimm7:$val)))]>;
2047 def r16: SHLHIInst<(outs R16C:$rT), (ins R16C:$rA, u7imm:$val),
2048 [(set R16C:$rT, (shl R16C:$rA, (i16 uimm7:$val)))]>;
2053 def : Pat<(SPUvec_shl (v8i16 VECREG:$rA), (i32 uimm7:$val)),
2054 (SHLHIv8i16 VECREG:$rA, (TO_IMM16 uimm7:$val))>;
2056 def : Pat<(shl R16C:$rA, (i32 uimm7:$val)),
2057 (SHLHIr16 R16C:$rA, (TO_IMM16 uimm7:$val))>;
2062 RRForm<0b11111010000, OOL, IOL, "shl\t$rT, $rA, $rB",
2068 SHLInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
2070 (SPUvec_shl (v4i32 VECREG:$rA), (v4i32 VECREG:$rB)))]>;
2072 SHLInst<(outs R32C:$rT), (ins R32C:$rA, R32C:$rB),
2073 [(set R32C:$rT, (shl R32C:$rA, R32C:$rB))]>;
2081 RI7Form<0b11111010000, OOL, IOL, "shli\t$rT, $rA, $val",
2087 SHLIInst<(outs VECREG:$rT), (ins VECREG:$rA, u7imm_i32:$val),
2089 (SPUvec_shl (v4i32 VECREG:$rA), (i32 uimm7:$val)))]>;
2092 SHLIInst<(outs R32C:$rT), (ins R32C:$rA, u7imm_i32:$val),
2093 [(set R32C:$rT, (shl R32C:$rA, (i32 uimm7:$val)))]>;
2110 RRForm<0b11011011100, OOL, IOL, "shlqbi\t$rT, $rA, $rB",
2114 SHLQBIInst<(outs VECREG:$rT), (ins VECREG:$rA, R32C:$rB),
2116 (SPUshlquad_l_bits (vectype VECREG:$rA), R32C:$rB))]>;
2119 SHLQBIInst<(outs rclass:$rT), (ins rclass:$rA, R32C:$rB),
2139 RI7Form<0b11011111100, OOL, IOL, "shlqbii\t$rT, $rA, $val",
2143 SHLQBIIInst<(outs VECREG:$rT), (ins VECREG:$rA, u7imm_i32:$val),
2145 (SPUshlquad_l_bits (vectype VECREG:$rA), (i32 bitshift:$val)))]>;
2163 RI7Form<0b11111011100, OOL, IOL, "shlqby\t$rT, $rA, $rB",
2167 SHLQBYInst<(outs VECREG:$rT), (ins VECREG:$rA, R32C:$rB),
2169 (SPUshlquad_l_bytes (vectype VECREG:$rA), R32C:$rB))]>;
2179 def r128: SHLQBYInst<(outs GPRC:$rT), (ins GPRC:$rA, R32C:$rB),
2180 [(set GPRC:$rT, (SPUshlquad_l_bytes GPRC:$rA, R32C:$rB))]>;
2186 RI7Form<0b11111111100, OOL, IOL, "shlqbyi\t$rT, $rA, $val",
2190 SHLQBYIInst<(outs VECREG:$rT), (ins VECREG:$rA, u7imm_i32:$val),
2192 (SPUshlquad_l_bytes (vectype VECREG:$rA), (i32 uimm7:$val)))]>;
2202 def r128: SHLQBYIInst<(outs GPRC:$rT), (ins GPRC:$rA, u7imm_i32:$val),
2204 (SPUshlquad_l_bytes GPRC:$rA, (i32 uimm7:$val)))]>;
2210 RRForm<0b00111001111, OOL, IOL, "shlqbybi\t$rT, $rA, $rB",
2214 SHLQBYBIInst<(outs VECREG:$rT), (ins VECREG:$rA, R32C:$rB),
2218 SHLQBYBIInst<(outs rclass:$rT), (ins rclass:$rA, R32C:$rB),
2239 RRForm<0b00111010000, OOL, IOL, "roth\t$rT, $rA, $rB",
2243 ROTHInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
2245 (SPUvec_rotl VECREG:$rA, (v8i16 VECREG:$rB)))]>;
2248 ROTHInst<(outs rclass:$rT), (ins rclass:$rA, rclass:$rB),
2249 [(set rclass:$rT, (rotl rclass:$rA, rclass:$rB))]>;
2259 def ROTHr16_r32: ROTHInst<(outs R16C:$rT), (ins R16C:$rA, R32C:$rB),
2260 [(set R16C:$rT, (rotl R16C:$rA, R32C:$rB))]>;
2266 RI7Form<0b00111110000, OOL, IOL, "rothi\t$rT, $rA, $val",
2270 ROTHIInst<(outs VECREG:$rT), (ins VECREG:$rA, u7imm:$val),
2272 (SPUvec_rotl VECREG:$rA, (i16 uimm7:$val)))]>;
2277 def r16: ROTHIInst<(outs R16C:$rT), (ins R16C:$rA, u7imm:$val),
2278 [(set R16C:$rT, (rotl R16C:$rA, (i16 uimm7:$val)))]>;
2279 def r16_r32: ROTHIInst<(outs R16C:$rT), (ins R16C:$rA, u7imm_i32:$val),
2280 [(set R16C:$rT, (rotl R16C:$rA, (i32 uimm7:$val)))]>;
2285 def : Pat<(SPUvec_rotl (v8i16 VECREG:$rA), (i32 uimm7:$val)),
2286 (ROTHIv8i16 VECREG:$rA, (TO_IMM16 imm:$val))>;
2293 RRForm<0b00011010000, OOL, IOL, "rot\t$rT, $rA, $rB",
2297 ROTInst<(outs VECREG:$rT), (ins VECREG:$rA, R32C:$rB),
2299 (SPUvec_rotl (vectype VECREG:$rA), R32C:$rB))]>;
2302 ROTInst<(outs rclass:$rT), (ins rclass:$rA, R32C:$rB),
2304 (rotl rclass:$rA, R32C:$rB))]>;
2317 ROTInst<(outs R32C:$rT), (ins R32C:$rA, R16C:$rB),
2318 [(set R32C:$rT, (rotl R32C:$rA, (i32 (anyext R16C:$rB))))]>;
2320 def : Pat<(rotl R32C:$rA, (i32 (zext R16C:$rB))),
2321 (ROTr32_r16_anyext R32C:$rA, R16C:$rB)>;
2323 def : Pat<(rotl R32C:$rA, (i32 (sext R16C:$rB))),
2324 (ROTr32_r16_anyext R32C:$rA, R16C:$rB)>;
2327 ROTInst<(outs R32C:$rT), (ins R32C:$rA, R8C:$rB),
2328 [(set R32C:$rT, (rotl R32C:$rA, (i32 (anyext R8C:$rB))))]>;
2330 def : Pat<(rotl R32C:$rA, (i32 (zext R8C:$rB))),
2331 (ROTr32_r8_anyext R32C:$rA, R8C:$rB)>;
2333 def : Pat<(rotl R32C:$rA, (i32 (sext R8C:$rB))),
2334 (ROTr32_r8_anyext R32C:$rA, R8C:$rB)>;
2341 RI7Form<0b00011110000, OOL, IOL, "roti\t$rT, $rA, $val",
2345 ROTIInst<(outs VECREG:$rT), (ins VECREG:$rA, optype:$val),
2347 (SPUvec_rotl (vectype VECREG:$rA), (inttype pred:$val)))]>;
2350 ROTIInst<(outs rclass:$rT), (ins rclass:$rA, optype:$val),
2351 [(set rclass:$rT, (rotl rclass:$rA, (inttype pred:$val)))]>;
2371 RRForm<0b00111011100, OOL, IOL, "rotqby\t$rT, $rA, $rB",
2375 ROTQBYInst<(outs rc:$rT), (ins rc:$rA, R32C:$rB),
2377 (SPUrotbytes_left (type rc:$rA), R32C:$rB))]>;
2400 RI7Form<0b00111111100, OOL, IOL, "rotqbyi\t$rT, $rA, $val",
2404 ROTQBYIInst<(outs rclass:$rT), (ins rclass:$rA, u7imm:$val),
2406 (SPUrotbytes_left (type rclass:$rA), (i16 uimm7:$val)))]>;
2427 "rotqbybi\t$rT, $rA, $shift",
2431 ROTQBYBIInst<(outs VECREG:$rT), (ins VECREG:$rA, rclass:$shift),
2433 (SPUrotbytes_left_bits (vectype VECREG:$rA), rclass:$shift))]>;
2452 RRForm<0b00011011100, OOL, IOL, "rotqbi\t$rT, $rA, $rB",
2456 ROTQBIInst<(outs VECREG:$rT), (ins VECREG:$rA, R32C:$rB),
2460 ROTQBIInst<(outs rclass:$rT), (ins rclass:$rA, R32C:$rB),
2477 RI7Form<0b00011111100, OOL, IOL, "rotqbii\t$rT, $rA, $val",
2482 ROTQBIIInst<(outs VECREG:$rT), (ins VECREG:$rA, optype:$val),
2487 ROTQBIIInst<(outs rclass:$rT), (ins rclass:$rA, optype:$val),
2512 RRForm<0b10111010000, OOL, IOL, "rothm\t$rT, $rA, $rB",
2516 ROTHMInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
2519 def : Pat<(SPUvec_srl (v8i16 VECREG:$rA), (v8i16 VECREG:$rB)),
2520 (ROTHMv8i16 VECREG:$rA, (SFHIvec VECREG:$rB, 0))>;
2527 ROTHMInst<(outs R16C:$rT), (ins R16C:$rA, R32C:$rB),
2530 def : Pat<(srl R16C:$rA, R32C:$rB),
2531 (ROTHMr16 R16C:$rA, (SFIr32 R32C:$rB, 0))>;
2533 def : Pat<(srl R16C:$rA, R16C:$rB),
2534 (ROTHMr16 R16C:$rA,
2537 def : Pat<(srl R16C:$rA, R8C:$rB),
2538 (ROTHMr16 R16C:$rA,
2546 RI7Form<0b10111110000, OOL, IOL, "rothmi\t$rT, $rA, $val",
2550 ROTHMIInst<(outs VECREG:$rT), (ins VECREG:$rA, rothNeg7imm:$val),
2553 def : Pat<(SPUvec_srl (v8i16 VECREG:$rA), (i32 imm:$val)),
2554 (ROTHMIv8i16 VECREG:$rA, imm:$val)>;
2556 def: Pat<(SPUvec_srl (v8i16 VECREG:$rA), (i16 imm:$val)),
2557 (ROTHMIv8i16 VECREG:$rA, (TO_IMM32 imm:$val))>;
2559 def: Pat<(SPUvec_srl (v8i16 VECREG:$rA), (i8 imm:$val)),
2560 (ROTHMIv8i16 VECREG:$rA, (TO_IMM32 imm:$val))>;
2563 ROTHMIInst<(outs R16C:$rT), (ins R16C:$rA, rothNeg7imm:$val),
2566 def: Pat<(srl R16C:$rA, (i32 uimm7:$val)),
2567 (ROTHMIr16 R16C:$rA, uimm7:$val)>;
2569 def: Pat<(srl R16C:$rA, (i16 uimm7:$val)),
2570 (ROTHMIr16 R16C:$rA, (TO_IMM32 uimm7:$val))>;
2572 def: Pat<(srl R16C:$rA, (i8 uimm7:$val)),
2573 (ROTHMIr16 R16C:$rA, (TO_IMM32 uimm7:$val))>;
2577 RRForm<0b10011010000, OOL, IOL, "rotm\t$rT, $rA, $rB",
2581 ROTMInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
2584 def : Pat<(SPUvec_srl (v4i32 VECREG:$rA), (v4i32 VECREG:$rB)),
2585 (ROTMv4i32 VECREG:$rA, (SFIvec VECREG:$rB, 0))>;
2588 ROTMInst<(outs R32C:$rT), (ins R32C:$rA, R32C:$rB),
2591 def : Pat<(srl R32C:$rA, R32C:$rB),
2592 (ROTMr32 R32C:$rA, (SFIr32 R32C:$rB, 0))>;
2594 def : Pat<(srl R32C:$rA, R16C:$rB),
2595 (ROTMr32 R32C:$rA,
2598 def : Pat<(srl R32C:$rA, R8C:$rB),
2599 (ROTMr32 R32C:$rA,
2604 RI7Form<0b10011110000, (outs VECREG:$rT), (ins VECREG:$rA, rotNeg7imm:$val),
2605 "rotmi\t$rT, $rA, $val", RotShiftVec,
2607 (SPUvec_srl VECREG:$rA, (i32 uimm7:$val)))]>;
2609 def : Pat<(SPUvec_srl (v4i32 VECREG:$rA), (i16 uimm7:$val)),
2610 (ROTMIv4i32 VECREG:$rA, (TO_IMM32 uimm7:$val))>;
2612 def : Pat<(SPUvec_srl (v4i32 VECREG:$rA), (i8 uimm7:$val)),
2613 (ROTMIv4i32 VECREG:$rA, (TO_IMM32 uimm7:$val))>;
2617 RI7Form<0b10011110000, (outs R32C:$rT), (ins R32C:$rA, rotNeg7imm:$val),
2618 "rotmi\t$rT, $rA, $val", RotShiftVec,
2619 [(set R32C:$rT, (srl R32C:$rA, (i32 uimm7:$val)))]>;
2621 def : Pat<(srl R32C:$rA, (i16 imm:$val)),
2622 (ROTMIr32 R32C:$rA, (TO_IMM32 uimm7:$val))>;
2624 def : Pat<(srl R32C:$rA, (i8 imm:$val)),
2625 (ROTMIr32 R32C:$rA, (TO_IMM32 uimm7:$val))>;
2634 RRForm<0b10111011100, OOL, IOL, "rotqmby\t$rT, $rA, $rB",
2638 ROTQMBYInst<(outs VECREG:$rT), (ins VECREG:$rA, R32C:$rB),
2642 ROTQMBYInst<(outs rclass:$rT), (ins rclass:$rA, R32C:$rB),
2658 def : Pat<(SPUsrl_bytes GPRC:$rA, R32C:$rB),
2659 (ROTQMBYr128 GPRC:$rA,
2663 RI7Form<0b10111111100, OOL, IOL, "rotqmbyi\t$rT, $rA, $val",
2667 ROTQMBYIInst<(outs VECREG:$rT), (ins VECREG:$rA, rotNeg7imm:$val),
2672 ROTQMBYIInst<(outs rclass:$rT), (ins rclass:$rA, optype:$val),
2677 ROTQMBYIInst<(outs GPRC:$rT), (ins rclass:$rA, optype:$val),
2703 RRForm<0b10110011100, OOL, IOL, "rotqmbybi\t$rT, $rA, $rB",
2707 ROTQMBYBIInst<(outs VECREG:$rT), (ins VECREG:$rA, R32C:$rB),
2716 def r128: ROTQMBYBIInst<(outs GPRC:$rT), (ins GPRC:$rA, R32C:$rB),
2728 RRForm<0b10011011100, OOL, IOL, "rotqmbi\t$rT, $rA, $rB",
2732 ROTQMBIInst<(outs VECREG:$rT), (ins VECREG:$rA, R32C:$rB),
2736 ROTQMBIInst<(outs rclass:$rT), (ins rclass:$rA, R32C:$rB),
2752 def : Pat<(srl GPRC:$rA, R32C:$rB),
2753 (ROTQMBYBIr128 (ROTQMBIr128 GPRC:$rA,
2763 RI7Form<0b10011111100, OOL, IOL, "rotqmbii\t$rT, $rA, $val",
2767 ROTQMBIIInst<(outs VECREG:$rT), (ins VECREG:$rA, rotNeg7imm:$val),
2771 ROTQMBIIInst<(outs rclass:$rT), (ins rclass:$rA, rotNeg7imm:$val),
2791 RRForm<0b01111010000, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
2792 "rotmah\t$rT, $rA, $rB", RotShiftVec,
2795 def : Pat<(SPUvec_sra (v8i16 VECREG:$rA), (v8i16 VECREG:$rB)),
2796 (ROTMAHv8i16 VECREG:$rA, (SFHIvec VECREG:$rB, 0))>;
2799 RRForm<0b01111010000, (outs R16C:$rT), (ins R16C:$rA, R32C:$rB),
2800 "rotmah\t$rT, $rA, $rB", RotShiftVec,
2803 def : Pat<(sra R16C:$rA, R32C:$rB),
2804 (ROTMAHr16 R16C:$rA, (SFIr32 R32C:$rB, 0))>;
2806 def : Pat<(sra R16C:$rA, R16C:$rB),
2807 (ROTMAHr16 R16C:$rA,
2810 def : Pat<(sra R16C:$rA, R8C:$rB),
2811 (ROTMAHr16 R16C:$rA,
2815 RRForm<0b01111110000, (outs VECREG:$rT), (ins VECREG:$rA, rothNeg7imm:$val),
2816 "rotmahi\t$rT, $rA, $val", RotShiftVec,
2818 (SPUvec_sra (v8i16 VECREG:$rA), (i32 uimm7:$val)))]>;
2820 def : Pat<(SPUvec_sra (v8i16 VECREG:$rA), (i16 uimm7:$val)),
2821 (ROTMAHIv8i16 (v8i16 VECREG:$rA), (TO_IMM32 uimm7:$val))>;
2823 def : Pat<(SPUvec_sra (v8i16 VECREG:$rA), (i8 uimm7:$val)),
2824 (ROTMAHIv8i16 (v8i16 VECREG:$rA), (TO_IMM32 uimm7:$val))>;
2827 RRForm<0b01111110000, (outs R16C:$rT), (ins R16C:$rA, rothNeg7imm_i16:$val),
2828 "rotmahi\t$rT, $rA, $val", RotShiftVec,
2829 [(set R16C:$rT, (sra R16C:$rA, (i16 uimm7:$val)))]>;
2831 def : Pat<(sra R16C:$rA, (i32 imm:$val)),
2832 (ROTMAHIr16 R16C:$rA, (TO_IMM32 uimm7:$val))>;
2834 def : Pat<(sra R16C:$rA, (i8 imm:$val)),
2835 (ROTMAHIr16 R16C:$rA, (TO_IMM32 uimm7:$val))>;
2838 RRForm<0b01011010000, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
2839 "rotma\t$rT, $rA, $rB", RotShiftVec,
2842 def : Pat<(SPUvec_sra (v4i32 VECREG:$rA), (v4i32 VECREG:$rB)),
2843 (ROTMAv4i32 VECREG:$rA, (SFIvec (v4i32 VECREG:$rB), 0))>;
2846 RRForm<0b01011010000, (outs R32C:$rT), (ins R32C:$rA, R32C:$rB),
2847 "rotma\t$rT, $rA, $rB", RotShiftVec,
2850 def : Pat<(sra R32C:$rA, R32C:$rB),
2851 (ROTMAr32 R32C:$rA, (SFIr32 R32C:$rB, 0))>;
2853 def : Pat<(sra R32C:$rA, R16C:$rB),
2854 (ROTMAr32 R32C:$rA,
2857 def : Pat<(sra R32C:$rA, R8C:$rB),
2858 (ROTMAr32 R32C:$rA,
2863 "rotmai\t$rT, $rA, $val",
2867 ROTMAIInst<(outs VECREG:$rT), (ins VECREG:$rA, intop:$val),
2869 (SPUvec_sra VECREG:$rA, (inttype uimm7:$val)))]>;
2872 ROTMAIInst<(outs rclass:$rT), (ins rclass:$rA, intop:$val),
2873 [(set rclass:$rT, (sra rclass:$rA, (inttype uimm7:$val)))]>;
2891 RRForm_3<0b00011011110, (outs), (ins R32C:$rA, R32C:$rB),
2892 "heq\t$rA, $rB", BranchResolv,
2896 RI10Form_2<0b11111110, (outs), (ins R32C:$rA, s10imm:$val),
2897 "heqi\t$rA, $val", BranchResolv,
2903 RRForm_3<0b00011010010, (outs), (ins R32C:$rA, R32C:$rB),
2904 "hgt\t$rA, $rB", BranchResolv,
2908 RI10Form_2<0b11110010, (outs), (ins R32C:$rA, s10imm:$val),
2909 "hgti\t$rA, $val", BranchResolv,
2913 RRForm_3<0b00011011010, (outs), (ins R32C:$rA, R32C:$rB),
2914 "hlgt\t$rA, $rB", BranchResolv,
2918 RI10Form_2<0b11111010, (outs), (ins R32C:$rA, s10imm:$val),
2919 "hlgti\t$rA, $val", BranchResolv,
2928 RRForm<0b00001011110, OOL, IOL, "ceqb\t$rT, $rA, $rB",
2934 CEQBInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
2935 [(set (v16i8 VECREG:$rT), (seteq (v8i16 VECREG:$rA),
2939 CEQBInst<(outs R8C:$rT), (ins R8C:$rA, R8C:$rB),
2940 [(set R8C:$rT, (seteq R8C:$rA, R8C:$rB))]>;
2944 RI10Form<0b01111110, OOL, IOL, "ceqbi\t$rT, $rA, $val",
2950 CEQBIInst<(outs VECREG:$rT), (ins VECREG:$rA, s10imm_i8:$val),
2951 [(set (v16i8 VECREG:$rT), (seteq (v16i8 VECREG:$rA),
2954 CEQBIInst<(outs R8C:$rT), (ins R8C:$rA, s10imm_i8:$val),
2955 [(set R8C:$rT, (seteq R8C:$rA, immSExt8:$val))]>;
2959 RRForm<0b00010011110, OOL, IOL, "ceqh\t$rT, $rA, $rB",
2964 def v8i16 : CEQHInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
2965 [(set (v8i16 VECREG:$rT), (seteq (v8i16 VECREG:$rA),
2968 def r16 : CEQHInst<(outs R16C:$rT), (ins R16C:$rA, R16C:$rB),
2969 [(set R16C:$rT, (seteq R16C:$rA, R16C:$rB))]>;
2973 RI10Form<0b10111110, OOL, IOL, "ceqhi\t$rT, $rA, $val",
2978 def v8i16 : CEQHIInst<(outs VECREG:$rT), (ins VECREG:$rA, s10imm:$val),
2980 (seteq (v8i16 VECREG:$rA),
2982 def r16 : CEQHIInst<(outs R16C:$rT), (ins R16C:$rA, s10imm:$val),
2983 [(set R16C:$rT, (seteq R16C:$rA, i16ImmSExt10:$val))]>;
2987 RRForm<0b00000011110, OOL, IOL, "ceq\t$rT, $rA, $rB",
2992 def v4i32 : CEQInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
2994 (seteq (v4i32 VECREG:$rA), (v4i32 VECREG:$rB)))]>;
2996 def r32 : CEQInst<(outs R32C:$rT), (ins R32C:$rA, R32C:$rB),
2997 [(set R32C:$rT, (seteq R32C:$rA, R32C:$rB))]>;
3001 RI10Form<0b00111110, OOL, IOL, "ceqi\t$rT, $rA, $val",
3006 def v4i32 : CEQIInst<(outs VECREG:$rT), (ins VECREG:$rA, s10imm:$val),
3008 (seteq (v4i32 VECREG:$rA),
3011 def r32: CEQIInst<(outs R32C:$rT), (ins R32C:$rA, s10imm_i32:$val),
3012 [(set R32C:$rT, (seteq R32C:$rA, i32ImmSExt10:$val))]>;
3016 RRForm<0b00001010010, OOL, IOL, "cgtb\t$rT, $rA, $rB",
3022 CGTBInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
3023 [(set (v16i8 VECREG:$rT), (setgt (v8i16 VECREG:$rA),
3027 CGTBInst<(outs R8C:$rT), (ins R8C:$rA, R8C:$rB),
3028 [(set R8C:$rT, (setgt R8C:$rA, R8C:$rB))]>;
3032 RI10Form<0b01110010, OOL, IOL, "cgtbi\t$rT, $rA, $val",
3038 CGTBIInst<(outs VECREG:$rT), (ins VECREG:$rA, s10imm_i8:$val),
3039 [(set (v16i8 VECREG:$rT), (setgt (v16i8 VECREG:$rA),
3042 CGTBIInst<(outs R8C:$rT), (ins R8C:$rA, s10imm_i8:$val),
3043 [(set R8C:$rT, (setgt R8C:$rA, immSExt8:$val))]>;
3047 RRForm<0b00010010010, OOL, IOL, "cgth\t$rT, $rA, $rB",
3052 def v8i16 : CGTHInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
3053 [(set (v8i16 VECREG:$rT), (setgt (v8i16 VECREG:$rA),
3056 def r16 : CGTHInst<(outs R16C:$rT), (ins R16C:$rA, R16C:$rB),
3057 [(set R16C:$rT, (setgt R16C:$rA, R16C:$rB))]>;
3061 RI10Form<0b10110010, OOL, IOL, "cgthi\t$rT, $rA, $val",
3066 def v8i16 : CGTHIInst<(outs VECREG:$rT), (ins VECREG:$rA, s10imm:$val),
3068 (setgt (v8i16 VECREG:$rA),
3070 def r16 : CGTHIInst<(outs R16C:$rT), (ins R16C:$rA, s10imm:$val),
3071 [(set R16C:$rT, (setgt R16C:$rA, i16ImmSExt10:$val))]>;
3075 RRForm<0b00000010010, OOL, IOL, "cgt\t$rT, $rA, $rB",
3080 def v4i32 : CGTInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
3082 (setgt (v4i32 VECREG:$rA), (v4i32 VECREG:$rB)))]>;
3084 def r32 : CGTInst<(outs R32C:$rT), (ins R32C:$rA, R32C:$rB),
3085 [(set R32C:$rT, (setgt R32C:$rA, R32C:$rB))]>;
3089 RI10Form<0b00110010, OOL, IOL, "cgti\t$rT, $rA, $val",
3094 def v4i32 : CGTIInst<(outs VECREG:$rT), (ins VECREG:$rA, s10imm:$val),
3096 (setgt (v4i32 VECREG:$rA),
3099 def r32: CGTIInst<(outs R32C:$rT), (ins R32C:$rA, s10imm_i32:$val),
3100 [(set R32C:$rT, (setgt R32C:$rA, i32ImmSExt10:$val))]>;
3103 def v4f32: CGTIInst<(outs VECREG:$rT), (ins VECREG:$rA, s10imm:$val),
3105 (setgt (v4i32 (bitconvert (v4f32 VECREG:$rA))),
3108 def f32: CGTIInst<(outs R32C:$rT), (ins R32FP:$rA, s10imm_i32:$val),
3113 RRForm<0b00001011010, OOL, IOL, "clgtb\t$rT, $rA, $rB",
3119 CLGTBInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
3120 [(set (v16i8 VECREG:$rT), (setugt (v8i16 VECREG:$rA),
3124 CLGTBInst<(outs R8C:$rT), (ins R8C:$rA, R8C:$rB),
3125 [(set R8C:$rT, (setugt R8C:$rA, R8C:$rB))]>;
3129 RI10Form<0b01111010, OOL, IOL, "clgtbi\t$rT, $rA, $val",
3135 CLGTBIInst<(outs VECREG:$rT), (ins VECREG:$rA, s10imm_i8:$val),
3136 [(set (v16i8 VECREG:$rT), (setugt (v16i8 VECREG:$rA),
3139 CLGTBIInst<(outs R8C:$rT), (ins R8C:$rA, s10imm_i8:$val),
3140 [(set R8C:$rT, (setugt R8C:$rA, immSExt8:$val))]>;
3144 RRForm<0b00010011010, OOL, IOL, "clgth\t$rT, $rA, $rB",
3149 def v8i16 : CLGTHInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
3150 [(set (v8i16 VECREG:$rT), (setugt (v8i16 VECREG:$rA),
3153 def r16 : CLGTHInst<(outs R16C:$rT), (ins R16C:$rA, R16C:$rB),
3154 [(set R16C:$rT, (setugt R16C:$rA, R16C:$rB))]>;
3158 RI10Form<0b10111010, OOL, IOL, "clgthi\t$rT, $rA, $val",
3163 def v8i16 : CLGTHIInst<(outs VECREG:$rT), (ins VECREG:$rA, s10imm:$val),
3165 (setugt (v8i16 VECREG:$rA),
3167 def r16 : CLGTHIInst<(outs R16C:$rT), (ins R16C:$rA, s10imm:$val),
3168 [(set R16C:$rT, (setugt R16C:$rA, i16ImmSExt10:$val))]>;
3172 RRForm<0b00000011010, OOL, IOL, "clgt\t$rT, $rA, $rB",
3177 def v4i32 : CLGTInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
3179 (setugt (v4i32 VECREG:$rA), (v4i32 VECREG:$rB)))]>;
3181 def r32 : CLGTInst<(outs R32C:$rT), (ins R32C:$rA, R32C:$rB),
3182 [(set R32C:$rT, (setugt R32C:$rA, R32C:$rB))]>;
3186 RI10Form<0b00111010, OOL, IOL, "clgti\t$rT, $rA, $val",
3191 def v4i32 : CLGTIInst<(outs VECREG:$rT), (ins VECREG:$rA, s10imm:$val),
3193 (setugt (v4i32 VECREG:$rA),
3196 def r32: CLGTIInst<(outs R32C:$rT), (ins R32C:$rA, s10imm_i32:$val),
3197 [(set R32C:$rT, (setugt R32C:$rA, i32ImmSExt10:$val))]>;
3236 Pat<(cond rclass:$rA, rclass:$rB),
3237 (xorinst (cmpare rclass:$rA, rclass:$rB), (inttype -1))>;
3241 Pat<(cond rclass:$rA, (inttype immpred:$imm)),
3242 (xorinst (cmpare rclass:$rA, (inttype immpred:$imm)), (inttype -1))>;
3255 Pat<(cond rclass:$rA, rclass:$rB),
3256 (binop (cmpOp1 rclass:$rA, rclass:$rB),
3257 (cmpOp2 rclass:$rA, rclass:$rB))>;
3262 Pat<(cond rclass:$rA, (immtype immpred:$imm)),
3263 (binop (cmpOp1 rclass:$rA, (immtype immpred:$imm)),
3264 (cmpOp2 rclass:$rA, (immtype immpred:$imm)))>;
3270 def : Pat<(setle R8C:$rA, R8C:$rB),
3271 (XORBIr8 (CGTBr8 R8C:$rA, R8C:$rB), 0xff)>;
3272 def : Pat<(setle R8C:$rA, immU8:$imm),
3273 (XORBIr8 (CGTBIr8 R8C:$rA, immU8:$imm), 0xff)>;
3280 def : Pat<(setle R16C:$rA, R16C:$rB),
3281 (XORHIr16 (CGTHr16 R16C:$rA, R16C:$rB), 0xffff)>;
3282 def : Pat<(setle R16C:$rA, i16ImmSExt10:$imm),
3283 (XORHIr16 (CGTHIr16 R16C:$rA, i16ImmSExt10:$imm), 0xffff)>;
3290 def : Pat<(setle R32C:$rA, R32C:$rB),
3291 (XORIr32 (CGTr32 R32C:$rA, R32C:$rB), 0xffffffff)>;
3292 def : Pat<(setle R32C:$rA, i32ImmSExt10:$imm),
3293 (XORIr32 (CGTIr32 R32C:$rA, i32ImmSExt10:$imm), 0xffffffff)>;
3299 def : Pat<(setule R8C:$rA, R8C:$rB),
3300 (XORBIr8 (CLGTBr8 R8C:$rA, R8C:$rB), 0xff)>;
3301 def : Pat<(setule R8C:$rA, immU8:$imm),
3302 (XORBIr8 (CLGTBIr8 R8C:$rA, immU8:$imm), 0xff)>;
3310 def : Pat<(setule R16C:$rA, R16C:$rB),
3311 (XORHIr16 (CLGTHr16 R16C:$rA, R16C:$rB), 0xffff)>;
3312 def : Pat<(setule R16C:$rA, i16ImmSExt10:$imm),
3313 (XORHIr16 (CLGTHIr16 R16C:$rA, i16ImmSExt10:$imm), 0xffff)>;
3320 def : Pat<(setule R32C:$rA, R32C:$rB),
3321 (XORIr32 (CLGTr32 R32C:$rA, R32C:$rB), 0xffffffff)>;
3322 def : Pat<(setule R32C:$rA, i32ImmSExt10:$imm),
3323 (XORIr32 (CLGTIr32 R32C:$rA, i32ImmSExt10:$imm), 0xffffffff)>;
3331 Pat<(select (inttype (cond rclass:$rA, rclass:$rB)),
3334 (cmpare rclass:$rA, rclass:$rB))>;
3338 Pat<(select (inttype (cond rclass:$rA, immpred:$imm)),
3341 (cmpare rclass:$rA, immpred:$imm))>;
3367 Pat<(select (inttype (cond rclass:$rA, rclass:$rB)),
3370 (binop (cmpOp1 rclass:$rA, rclass:$rB),
3371 (cmpOp2 rclass:$rA, rclass:$rB)))>;
3377 Pat<(select (inttype (cond rclass:$rA, (inttype immpred:$imm))),
3380 (binop (cmpOp1 rclass:$rA, (inttype immpred:$imm)),
3381 (cmpOp2 rclass:$rA, (inttype immpred:$imm))))>;
3517 BICondForm<0b10010100100, (outs), IOL, "binz\t$rA, $dest", pattern>;
3520 BINZInst<(ins rclass:$rA, brtarget:$dest),
3521 [(brcond rclass:$rA, R32C:$dest)]>;
3524 BINZInst<(ins VECREG:$rA, R32C:$dest),
3525 [(brcond (vectype VECREG:$rA), R32C:$dest)]>;
3535 BICondForm<0b00010100100, (outs), IOL, "biz\t$rA, $func", pattern>;
3538 BIZInst<(ins rclass:$rA, R32C:$func), [/* no pattern */]>;
3541 BIZInst<(ins VECREG:$rA, R32C:$func), [/* no pattern */]>;
3591 def : Pat<(brcond (i16 (seteq R16C:$rA, 0)), bb:$dest),
3592 (BRHZr16 R16C:$rA, bb:$dest)>;
3593 def : Pat<(brcond (i16 (setne R16C:$rA, 0)), bb:$dest),
3594 (BRHNZr16 R16C:$rA, bb:$dest)>;
3596 def : Pat<(brcond (i32 (seteq R32C:$rA, 0)), bb:$dest),
3597 (BRZr32 R32C:$rA, bb:$dest)>;
3598 def : Pat<(brcond (i32 (setne R32C:$rA, 0)), bb:$dest),
3599 (BRNZr32 R32C:$rA, bb:$dest)>;
3603 def r16imm: Pat<(brcond (i16 (cond R16C:$rA, i16ImmSExt10:$val)), bb:$dest),
3604 (brinst16 (CEQHIr16 R16C:$rA, i16ImmSExt10:$val), bb:$dest)>;
3606 def r16 : Pat<(brcond (i16 (cond R16C:$rA, R16C:$rB)), bb:$dest),
3607 (brinst16 (CEQHr16 R16C:$rA, R16:$rB), bb:$dest)>;
3609 def r32imm : Pat<(brcond (i32 (cond R32C:$rA, i32ImmSExt10:$val)), bb:$dest),
3610 (brinst32 (CEQIr32 R32C:$rA, i32ImmSExt10:$val), bb:$dest)>;
3612 def r32 : Pat<(brcond (i32 (cond R32C:$rA, R32C:$rB)), bb:$dest),
3613 (brinst32 (CEQr32 R32C:$rA, R32C:$rB), bb:$dest)>;
3621 def r16imm : Pat<(brcond (i16 (cond R16C:$rA, i16ImmSExt10:$val)), bb:$dest),
3622 (brinst16 (CLGTHIr16 R16C:$rA, i16ImmSExt10:$val), bb:$dest)>;
3624 def r16 : Pat<(brcond (i16 (cond R16C:$rA, R16C:$rB)), bb:$dest),
3625 (brinst16 (CLGTHr16 R16C:$rA, R16:$rB), bb:$dest)>;
3627 def r32imm : Pat<(brcond (i32 (cond R32C:$rA, i32ImmSExt10:$val)), bb:$dest),
3628 (brinst32 (CLGTIr32 R32C:$rA, i32ImmSExt10:$val), bb:$dest)>;
3630 def r32 : Pat<(brcond (i32 (cond R32C:$rA, R32C:$rB)), bb:$dest),
3631 (brinst32 (CLGTr32 R32C:$rA, R32C:$rB), bb:$dest)>;
3640 def r16imm: Pat<(brcond (i16 (cond R16C:$rA, i16ImmSExt10:$val)), bb:$dest),
3641 (brinst16 (orinst16 (CLGTHIr16 R16C:$rA, i16ImmSExt10:$val),
3642 (CEQHIr16 R16C:$rA, i16ImmSExt10:$val)),
3645 def r16: Pat<(brcond (i16 (cond R16C:$rA, R16C:$rB)), bb:$dest),
3646 (brinst16 (orinst16 (CLGTHr16 R16C:$rA, R16:$rB),
3647 (CEQHr16 R16C:$rA, R16:$rB)),
3650 def r32imm : Pat<(brcond (i32 (cond R32C:$rA, i32ImmSExt10:$val)), bb:$dest),
3651 (brinst32 (orinst32 (CLGTIr32 R32C:$rA, i32ImmSExt10:$val),
3652 (CEQIr32 R32C:$rA, i32ImmSExt10:$val)),
3655 def r32 : Pat<(brcond (i32 (cond R32C:$rA, R32C:$rB)), bb:$dest),
3656 (brinst32 (orinst32 (CLGTr32 R32C:$rA, R32C:$rB),
3657 (CEQr32 R32C:$rA, R32C:$rB)),
3666 def r16imm : Pat<(brcond (i16 (cond R16C:$rA, i16ImmSExt10:$val)), bb:$dest),
3667 (brinst16 (CGTHIr16 R16C:$rA, i16ImmSExt10:$val), bb:$dest)>;
3669 def r16 : Pat<(brcond (i16 (cond R16C:$rA, R16C:$rB)), bb:$dest),
3670 (brinst16 (CGTHr16 R16C:$rA, R16:$rB), bb:$dest)>;
3672 def r32imm : Pat<(brcond (i32 (cond R32C:$rA, i32ImmSExt10:$val)), bb:$dest),
3673 (brinst32 (CGTIr32 R32C:$rA, i32ImmSExt10:$val), bb:$dest)>;
3675 def r32 : Pat<(brcond (i32 (cond R32C:$rA, R32C:$rB)), bb:$dest),
3676 (brinst32 (CGTr32 R32C:$rA, R32C:$rB), bb:$dest)>;
3685 def r16imm: Pat<(brcond (i16 (cond R16C:$rA, i16ImmSExt10:$val)), bb:$dest),
3686 (brinst16 (orinst16 (CGTHIr16 R16C:$rA, i16ImmSExt10:$val),
3687 (CEQHIr16 R16C:$rA, i16ImmSExt10:$val)),
3690 def r16: Pat<(brcond (i16 (cond R16C:$rA, R16C:$rB)), bb:$dest),
3691 (brinst16 (orinst16 (CGTHr16 R16C:$rA, R16:$rB),
3692 (CEQHr16 R16C:$rA, R16:$rB)),
3695 def r32imm : Pat<(brcond (i32 (cond R32C:$rA, i32ImmSExt10:$val)), bb:$dest),
3696 (brinst32 (orinst32 (CGTIr32 R32C:$rA, i32ImmSExt10:$val),
3697 (CEQIr32 R32C:$rA, i32ImmSExt10:$val)),
3700 def r32 : Pat<(brcond (i32 (cond R32C:$rA, R32C:$rB)), bb:$dest),
3701 (brinst32 (orinst32 (CGTr32 R32C:$rA, R32C:$rB),
3702 (CEQr32 R32C:$rA, R32C:$rB)),
3721 RRForm<0b01011000100, OOL, IOL, "fa\t$rT, $rA, $rB",
3725 FAInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
3727 (fadd (vectype VECREG:$rA), (vectype VECREG:$rB)))]>;
3732 def f32: FAInst<(outs R32FP:$rT), (ins R32FP:$rA, R32FP:$rB),
3733 [(set R32FP:$rT, (fadd R32FP:$rA, R32FP:$rB))]>;
3739 RRForm<0b01011000100, OOL, IOL, "fs\t$rT, $rA, $rB",
3743 FSInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
3745 (fsub (vectype VECREG:$rA), (vectype VECREG:$rB)))]>;
3750 def f32: FSInst<(outs R32FP:$rT), (ins R32FP:$rA, R32FP:$rB),
3751 [(set R32FP:$rT, (fsub R32FP:$rA, R32FP:$rB))]>;
3758 "fm\t$rT, $rA, $rB", SPrecFP,
3762 FMInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
3764 (fmul (type VECREG:$rA), (type VECREG:$rB)))]>;
3769 def f32: FMInst<(outs R32FP:$rT), (ins R32FP:$rA, R32FP:$rB),
3770 [(set R32FP:$rT, (fmul R32FP:$rA, R32FP:$rB))]>;
3778 RRRForm<0b0111, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB, VECREG:$rC),
3779 "fma\t$rT, $rA, $rB, $rC", SPrecFP,
3782 (fmul (v4f32 VECREG:$rA), (v4f32 VECREG:$rB))))]>;
3785 RRRForm<0b0111, (outs R32FP:$rT), (ins R32FP:$rA, R32FP:$rB, R32FP:$rC),
3786 "fma\t$rT, $rA, $rB, $rC", SPrecFP,
3787 [(set R32FP:$rT, (fadd R32FP:$rC, (fmul R32FP:$rA, R32FP:$rB)))]>;
3793 RRRForm<0b0111, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB, VECREG:$rC),
3794 "fms\t$rT, $rA, $rB, $rC", SPrecFP,
3796 (fsub (fmul (v4f32 VECREG:$rA), (v4f32 VECREG:$rB)),
3800 RRRForm<0b0111, (outs R32FP:$rT), (ins R32FP:$rA, R32FP:$rB, R32FP:$rC),
3801 "fms\t$rT, $rA, $rB, $rC", SPrecFP,
3803 (fsub (fmul R32FP:$rA, R32FP:$rB), R32FP:$rC))]>;
3814 RRRForm<0b1101, (outs R32FP:$rT), (ins R32FP:$rA, R32FP:$rB, R32FP:$rC),
3815 "fnms\t$rT, $rA, $rB, $rC", SPrecFP,
3816 [(set R32FP:$rT, (fsub R32FP:$rC, (fmul R32FP:$rA, R32FP:$rB)))]>;
3819 RRRForm<0b1101, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB, VECREG:$rC),
3820 "fnms\t$rT, $rA, $rB, $rC", SPrecFP,
3823 (fmul (v4f32 VECREG:$rA),
3833 "frest\t$rT, $rA", SPrecFP,
3837 FRESTInst<(outs VECREG:$rT), (ins VECREG:$rA)>;
3840 FRESTInst<(outs R32FP:$rT), (ins R32FP:$rA)>;
3844 RRForm<0b00101011110, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
3845 "fi\t$rT, $rA, $rB", SPrecFP,
3849 RRForm<0b00101011110, (outs R32FP:$rT), (ins R32FP:$rA, R32FP:$rB),
3850 "fi\t$rT, $rA, $rB", SPrecFP,
3861 RRForm<0b01000011110, (outs R32C:$rT), (ins R32FP:$rA, R32FP:$rB),
3862 "fceq\t$rT, $rA, $rB", SPrecFP,
3863 [(set R32C:$rT, (setueq R32FP:$rA, R32FP:$rB))]>;
3865 def : Pat<(setoeq R32FP:$rA, R32FP:$rB),
3866 (FCEQf32 R32FP:$rA, R32FP:$rB)>;
3869 RRForm<0b01010011110, (outs R32C:$rT), (ins R32FP:$rA, R32FP:$rB),
3870 "fcmeq\t$rT, $rA, $rB", SPrecFP,
3871 [(set R32C:$rT, (setueq (fabs R32FP:$rA), (fabs R32FP:$rB)))]>;
3873 def : Pat<(setoeq (fabs R32FP:$rA), (fabs R32FP:$rB)),
3874 (FCMEQf32 R32FP:$rA, R32FP:$rB)>;
3877 RRForm<0b01000011010, (outs R32C:$rT), (ins R32FP:$rA, R32FP:$rB),
3878 "fcgt\t$rT, $rA, $rB", SPrecFP,
3879 [(set R32C:$rT, (setugt R32FP:$rA, R32FP:$rB))]>;
3881 def : Pat<(setogt R32FP:$rA, R32FP:$rB),
3882 (FCGTf32 R32FP:$rA, R32FP:$rB)>;
3885 RRForm<0b01010011010, (outs R32C:$rT), (ins R32FP:$rA, R32FP:$rB),
3886 "fcmgt\t$rT, $rA, $rB", SPrecFP,
3887 [(set R32C:$rT, (setugt (fabs R32FP:$rA), (fabs R32FP:$rB)))]>;
3889 def : Pat<(setogt (fabs R32FP:$rA), (fabs R32FP:$rB)),
3890 (FCMGTf32 R32FP:$rA, R32FP:$rB)>;
3905 def : Pat<(setule R32FP:$rA, R32FP:$rB),
3906 (XORIr32 (FCGTf32 R32FP:$rA, R32FP:$rB), 0xffffffff)>;
3907 def : Pat<(setole R32FP:$rA, R32FP:$rB),
3908 (XORIr32 (FCGTf32 R32FP:$rA, R32FP:$rB), 0xffffffff)>;
3914 RRForm_1<0b01011101110, (outs R32FP:$rT), (ins R32FP:$rA),
3915 "fscrwr\t$rA", SPrecFP,
3926 // fdiv rA rB
3929 // fm rD rA rC # d = a * 1/b
3930 // fnms rB rD rB rA # b = - (d * b - a) --should == 0 in a perfect world
3957 CVTIntFPForm<0b0101101110, (outs VECREG:$rT), (ins VECREG:$rA),
3958 "csflt\t$rT, $rA, 0", SPrecFP,
3959 [(set (v4f32 VECREG:$rT), (sint_to_fp (v4i32 VECREG:$rA)))]>;
3963 CVTIntFPForm<0b0101101110, (outs R32FP:$rT), (ins R32C:$rA),
3964 "csflt\t$rT, $rA, 0", SPrecFP,
3965 [(set R32FP:$rT, (sint_to_fp R32C:$rA))]>;
3969 CVTIntFPForm<0b1101101110, (outs VECREG:$rT), (ins VECREG:$rA),
3970 "cuflt\t$rT, $rA, 0", SPrecFP,
3971 [(set (v4f32 VECREG:$rT), (uint_to_fp (v4i32 VECREG:$rA)))]>;
3974 CVTIntFPForm<0b1101101110, (outs R32FP:$rT), (ins R32C:$rA),
3975 "cuflt\t$rT, $rA, 0", SPrecFP,
3976 [(set R32FP:$rT, (uint_to_fp R32C:$rA))]>;
3982 CVTIntFPForm<0b1101101110, (outs VECREG:$rT), (ins VECREG:$rA),
3983 "cfltu\t$rT, $rA, 0", SPrecFP,
3984 [(set (v4i32 VECREG:$rT), (fp_to_uint (v4f32 VECREG:$rA)))]>;
3987 CVTIntFPForm<0b1101101110, (outs R32C:$rT), (ins R32FP:$rA),
3988 "cfltu\t$rT, $rA, 0", SPrecFP,
3989 [(set R32C:$rT, (fp_to_uint R32FP:$rA))]>;
3995 CVTIntFPForm<0b1101101110, (outs VECREG:$rT), (ins VECREG:$rA),
3996 "cflts\t$rT, $rA, 0", SPrecFP,
3997 [(set (v4i32 VECREG:$rT), (fp_to_sint (v4f32 VECREG:$rA)))]>;
4000 CVTIntFPForm<0b1101101110, (outs R32C:$rT), (ins R32FP:$rA),
4001 "cflts\t$rT, $rA, 0", SPrecFP,
4002 [(set R32C:$rT, (fp_to_sint R32FP:$rA))]>;
4016 RRForm_1<0b00011101110, (outs VECREG:$rT), (ins VECREG:$rA),
4017 "fesd\t$rT, $rA", SPrecFP,
4018 [/*(set (v2f64 VECREG:$rT), (fextend (v4f32 VECREG:$rA)))*/]>;
4021 RRForm_1<0b00011101110, (outs R64FP:$rT), (ins R32FP:$rA),
4022 "fesd\t$rT, $rA", SPrecFP,
4023 [(set R64FP:$rT, (fextend R32FP:$rA))]>;
4027 // RRForm_1<0b10011101110, (outs VECREG:$rT), (ins VECREG:$rA),
4028 // "frds\t$rT, $rA,", SPrecFP,
4029 // [(set (v4f32 R32FP:$rT), (fround (v2f64 R64FP:$rA)))]>;
4032 RRForm_1<0b10011101110, (outs R32FP:$rT), (ins R64FP:$rA),
4033 "frds\t$rT, $rA", SPrecFP,
4034 [(set R32FP:$rT, (fround R64FP:$rA))]>;
4042 RRForm<0b00110011010, (outs R64FP:$rT), (ins R64FP:$rA, R64FP:$rB),
4043 "dfa\t$rT, $rA, $rB", DPrecFP,
4044 [(set R64FP:$rT, (fadd R64FP:$rA, R64FP:$rB))]>;
4047 RRForm<0b00110011010, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
4048 "dfa\t$rT, $rA, $rB", DPrecFP,
4049 [(set (v2f64 VECREG:$rT), (fadd (v2f64 VECREG:$rA), (v2f64 VECREG:$rB)))]>;
4052 RRForm<0b10100011010, (outs R64FP:$rT), (ins R64FP:$rA, R64FP:$rB),
4053 "dfs\t$rT, $rA, $rB", DPrecFP,
4054 [(set R64FP:$rT, (fsub R64FP:$rA, R64FP:$rB))]>;
4057 RRForm<0b10100011010, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
4058 "dfs\t$rT, $rA, $rB", DPrecFP,
4060 (fsub (v2f64 VECREG:$rA), (v2f64 VECREG:$rB)))]>;
4063 RRForm<0b01100011010, (outs R64FP:$rT), (ins R64FP:$rA, R64FP:$rB),
4064 "dfm\t$rT, $rA, $rB", DPrecFP,
4065 [(set R64FP:$rT, (fmul R64FP:$rA, R64FP:$rB))]>;
4068 RRForm<0b00100011010, (outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB),
4069 "dfm\t$rT, $rA, $rB", DPrecFP,
4071 (fmul (v2f64 VECREG:$rA), (v2f64 VECREG:$rB)))]>;
4075 (ins R64FP:$rA, R64FP:$rB, R64FP:$rC),
4076 "dfma\t$rT, $rA, $rB", DPrecFP,
4077 [(set R64FP:$rT, (fadd R64FP:$rC, (fmul R64FP:$rA, R64FP:$rB)))]>,
4083 (ins VECREG:$rA, VECREG:$rB, VECREG:$rC),
4084 "dfma\t$rT, $rA, $rB", DPrecFP,
4087 (fmul (v2f64 VECREG:$rA), (v2f64 VECREG:$rB))))]>,
4093 (ins R64FP:$rA, R64FP:$rB, R64FP:$rC),
4094 "dfms\t$rT, $rA, $rB", DPrecFP,
4095 [(set R64FP:$rT, (fsub (fmul R64FP:$rA, R64FP:$rB), R64FP:$rC))]>,
4101 (ins VECREG:$rA, VECREG:$rB, VECREG:$rC),
4102 "dfms\t$rT, $rA, $rB", DPrecFP,
4104 (fsub (fmul (v2f64 VECREG:$rA), (v2f64 VECREG:$rB)),
4111 RRForm<0b01111010110, OOL, IOL, "dfnms\t$rT, $rA, $rB",
4117 DFNMSInst<(outs VECREG:$rT), (ins VECREG:$rA, VECREG:$rB, VECREG:$rC),
4121 DFNMSInst<(outs R64FP:$rT), (ins R64FP:$rA, R64FP:$rB, R64FP:$rC),
4128 (fmul (v2f64 VECREG:$rA),
4133 (fmul R64FP:$rA, R64FP:$rB)))]>;
4142 (ins R64FP:$rA, R64FP:$rB, R64FP:$rC),
4143 "dfnma\t$rT, $rA, $rB", DPrecFP,
4144 [(set R64FP:$rT, (fneg (fadd R64FP:$rC, (fmul R64FP:$rA, R64FP:$rB))))]>,
4150 (ins VECREG:$rA, VECREG:$rB, VECREG:$rC),
4151 "dfnma\t$rT, $rA, $rB", DPrecFP,
4154 (fmul (v2f64 VECREG:$rA),
4163 def : Pat<(fneg (v4f32 VECREG:$rA)),
4164 (XORfnegvec (v4f32 VECREG:$rA),
4167 def : Pat<(fneg R32FP:$rA),
4168 (XORfneg32 R32FP:$rA, (ILHUr32 0x8000))>;
4173 def : Pat<(fabs R32FP:$rA),
4174 (ANDfabs32 R32FP:$rA, (IOHLr32 (ILHUr32 0x7fff), 0xffff))>;
4176 def : Pat<(fabs (v4f32 VECREG:$rA)),
4177 (ANDfabsvec (v4f32 VECREG:$rA),
4275 def : Pat<(i32 (bitconvert R32FP:$rA)),
4276 (COPY_TO_REGCLASS R32FP:$rA, R32C)>;
4278 def : Pat<(f32 (bitconvert R32C:$rA)),
4279 (COPY_TO_REGCLASS R32C:$rA, R32FP)>;
4281 def : Pat<(i64 (bitconvert R64FP:$rA)),
4282 (COPY_TO_REGCLASS R64FP:$rA, R64C)>;
4284 def : Pat<(f64 (bitconvert R64C:$rA)),
4285 (COPY_TO_REGCLASS R64C:$rA, R64FP)>;