Lines Matching full:vector

10 /// support code generation for the standard 'V' (Vector) extension, version
149 vti.Vector, vti.Vector, vti.Log2SEW,
152 vti.Vector, vti.Vector, vti.Log2SEW,
165 vti.Vector, vti.Vector, vti.Log2SEW,
224 vti.Vector, vti.Vector, vti.Log2SEW,
227 vti.Vector, vti.Vector, vti.Scalar,
239 vti.Vector, vti.Vector, vti.Log2SEW,
242 vti.Vector, vti.Vector, vti.Scalar,
253 def : Pat<(fvti.Vector (vop (fvti.Vector (SplatFPOp fvti.Scalar:$rs2)),
254 (fvti.Vector fvti.RegClass:$rs1))),
259 (fvti.Vector (IMPLICIT_DEF)),
269 def : Pat<(fvti.Vector (vop (fvti.Vector (SplatFPOp fvti.Scalar:$rs2)),
270 (fvti.Vector fvti.RegClass:$rs1))),
275 (fvti.Vector (IMPLICIT_DEF)),
289 def : Pat<(vti.Mask (setcc (vti.Vector vti.RegClass:$rs1),
290 (vti.Vector vti.RegClass:$rs2), cc)),
302 def : Pat<(vti.Mask (setcc (vti.Vector vti.RegClass:$rs2),
303 (vti.Vector vti.RegClass:$rs1), invcc)),
317 def : Pat<(vti.Mask (setcc (vti.Vector vti.RegClass:$rs1),
318 (vti.Vector (SplatPatKind (XLenVT xop_kind:$rs2))), cc)),
320 def : Pat<(vti.Mask (setcc (vti.Vector (SplatPatKind (XLenVT xop_kind:$rs2))),
321 (vti.Vector vti.RegClass:$rs1), invcc)),
343 def : Pat<(vti.Mask (setcc (vti.Vector vti.RegClass:$rs1),
344 (vti.Vector (splatpat_kind simm5:$rs2)),
348 def : Pat<(vti.Mask (setcc (vti.Vector (splatpat_kind simm5:$rs2)),
349 (vti.Vector vti.RegClass:$rs1),
362 def : Pat<(fvti.Mask (setcc (fvti.Vector fvti.RegClass:$rs1),
363 (fvti.Vector fvti.RegClass:$rs2),
367 def : Pat<(fvti.Mask (setcc (fvti.Vector fvti.RegClass:$rs1),
374 (fvti.Vector fvti.RegClass:$rs1),
391 def : Pat<(vti.Vector (op (fti.Vector fti.RegClass:$rs2))),
393 (vti.Vector (IMPLICIT_DEF)),
404 def : Pat<(fvti.Vector (vop (ivti.Vector ivti.RegClass:$rs1))),
406 (fvti.Vector (IMPLICIT_DEF)),
421 def : Pat<(ivti.Vector (vop (fvti.Vector fvti.RegClass:$rs1))),
423 (ivti.Vector (IMPLICIT_DEF)),
435 def : Pat<(fwti.Vector (vop (ivti.Vector ivti.RegClass:$rs1))),
437 (fwti.Vector (IMPLICIT_DEF)),
450 def : Pat<(iwti.Vector (vop (fvti.Vector fvti.RegClass:$rs1))),
452 (iwti.Vector (IMPLICIT_DEF)),
464 def : Pat<(fvti.Vector (vop (iwti.Vector iwti.RegClass:$rs1))),
466 (fvti.Vector (IMPLICIT_DEF)),
482 def : Pat<(vti.Vector (vop (fwti.Vector fwti.RegClass:$rs1))),
484 (vti.Vector (IMPLICIT_DEF)),
496 def : Pat<(op (wti.Vector (extop1 (vti.Vector vti.RegClass:$rs2))),
497 (wti.Vector (extop2 (vti.Vector vti.RegClass:$rs1)))),
499 (wti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs2,
501 def : Pat<(op (wti.Vector (extop1 (vti.Vector vti.RegClass:$rs2))),
502 (wti.Vector (extop2 (vti.Vector (SplatPat (XLenVT GPR:$rs1)))))),
504 (wti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs2,
517 def : Pat<(op (wti.Vector wti.RegClass:$rs2),
518 (wti.Vector (extop (vti.Vector vti.RegClass:$rs1)))),
522 def : Pat<(op (wti.Vector wti.RegClass:$rs2),
523 (wti.Vector (extop (vti.Vector (SplatPat (XLenVT GPR:$rs1)))))),
525 (wti.Vector (IMPLICIT_DEF)), wti.RegClass:$rs2, GPR:$rs1,
543 (add (wti.Vector wti.RegClass:$rd),
544 (mul_oneuse (wti.Vector (extop1 (vti.Vector vti.RegClass:$rs1))),
545 (wti.Vector (extop2 (vti.Vector vti.RegClass:$rs2))))),
559 (add (wti.Vector wti.RegClass:$rd),
560 (mul_oneuse (wti.Vector (extop1 (vti.Vector (SplatPat (XLenVT GPR:$rs1))))),
561 (wti.Vector (extop2 (vti.Vector vti.RegClass:$rs2))))),
575 def : Pat<(op (wti.Vector (riscv_fpextend_vl_oneuse
576 (vti.Vector vti.RegClass:$rs2),
578 (wti.Vector (riscv_fpextend_vl_oneuse
579 (vti.Vector vti.RegClass:$rs1),
582 (wti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs2,
584 def : Pat<(op (wti.Vector (riscv_fpextend_vl_oneuse
585 (vti.Vector vti.RegClass:$rs2),
587 (wti.Vector (riscv_fpextend_vl_oneuse
588 (vti.Vector (SplatFPOp vti.ScalarRegClass:$rs1)),
591 (wti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs2,
593 def : Pat<(op (wti.Vector (riscv_fpextend_vl_oneuse
594 (vti.Vector vti.RegClass:$rs2),
596 (wti.Vector (SplatFPOp (fpext_oneuse vti.ScalarRegClass:$rs1)))),
598 (wti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs2,
610 def : Pat<(op (wti.Vector (riscv_fpextend_vl_oneuse
611 (vti.Vector vti.RegClass:$rs2),
613 (wti.Vector (riscv_fpextend_vl_oneuse
614 (vti.Vector vti.RegClass:$rs1),
617 (wti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs2,
623 def : Pat<(op (wti.Vector (riscv_fpextend_vl_oneuse
624 (vti.Vector vti.RegClass:$rs2),
626 (wti.Vector (riscv_fpextend_vl_oneuse
627 (vti.Vector (SplatFPOp (vti.Scalar vti.ScalarRegClass:$rs1))),
630 (wti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs2,
636 def : Pat<(op (wti.Vector (riscv_fpextend_vl_oneuse
637 (vti.Vector vti.RegClass:$rs2),
639 (wti.Vector (SplatFPOp (fpext_oneuse (vti.Scalar vti.ScalarRegClass:$rs1))))),
641 (wti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs2,
657 def : Pat<(op (wti.Vector wti.RegClass:$rs2),
658 (wti.Vector (riscv_fpextend_vl_oneuse
659 (vti.Vector vti.RegClass:$rs1),
668 def : Pat<(op (wti.Vector wti.RegClass:$rs2),
669 (wti.Vector (riscv_fpextend_vl_oneuse
670 (vti.Vector (SplatFPOp vti.ScalarRegClass:$rs1)),
673 (wti.Vector (IMPLICIT_DEF)), wti.RegClass:$rs2,
679 def : Pat<(op (wti.Vector wti.RegClass:$rs2),
680 (wti.Vector (SplatFPOp (fpext_oneuse (vti.Scalar vti.ScalarRegClass:$rs1))))),
682 (wti.Vector (IMPLICIT_DEF)), wti.RegClass:$rs2,
704 def : Pat<(fma (wti.Vector (riscv_fpextend_vl_oneuse
705 (vti.Vector vti.RegClass:$rs1),
707 (wti.Vector (riscv_fpextend_vl_oneuse
708 (vti.Vector vti.RegClass:$rs2),
710 (wti.Vector wti.RegClass:$rd)),
717 def : Pat<(fma (wti.Vector (SplatFPOp
719 (wti.Vector (riscv_fpextend_vl_oneuse
720 (vti.Vector vti.RegClass:$rs2),
722 (wti.Vector wti.RegClass:$rd)),
740 def : Pat<(fma (fneg (wti.Vector (riscv_fpextend_vl_oneuse
741 (vti.Vector vti.RegClass:$rs1),
743 (riscv_fpextend_vl_oneuse (vti.Vector vti.RegClass:$rs2),
753 (fneg (wti.Vector (riscv_fpextend_vl_oneuse
754 (vti.Vector vti.RegClass:$rs2),
763 …def : Pat<(fma (fneg (wti.Vector (SplatFPOp (fpext_oneuse (vti.Scalar vti.ScalarRegClass:$rs1))))),
764 (riscv_fpextend_vl_oneuse (vti.Vector vti.RegClass:$rs2),
784 def : Pat<(fma (wti.Vector (riscv_fpextend_vl_oneuse
785 (vti.Vector vti.RegClass:$rs1),
787 (riscv_fpextend_vl_oneuse (vti.Vector vti.RegClass:$rs2),
796 def : Pat<(fma (wti.Vector (SplatFPOp (fpext_oneuse (vti.Scalar vti.ScalarRegClass:$rs1)))),
797 (riscv_fpextend_vl_oneuse (vti.Vector vti.RegClass:$rs2),
817 def : Pat<(fma (fneg (wti.Vector (riscv_fpextend_vl_oneuse
818 (vti.Vector vti.RegClass:$rs1),
820 (riscv_fpextend_vl_oneuse (vti.Vector vti.RegClass:$rs2),
829 def : Pat<(fma (wti.Vector (SplatFPOp (fpext_oneuse (vti.Scalar vti.ScalarRegClass:$rs1)))),
830 (fneg (wti.Vector (riscv_fpextend_vl_oneuse
831 (vti.Vector vti.RegClass:$rs2),
840 …def : Pat<(fma (fneg (wti.Vector (SplatFPOp (fpext_oneuse (vti.Scalar vti.ScalarRegClass:$rs1))))),
841 (riscv_fpextend_vl_oneuse (vti.Vector vti.RegClass:$rs2),
860 def : Pat<(vti.Vector (op vti.RegClass:$rs2,
867 def : Pat<(vti.Vector (op vti.RegClass:$rs2,
879 def : Pat<(vop (vti.Vector vti.RegClass:$rs1),
880 (vti.Vector vti.RegClass:$rs2)),
882 (vti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs1, vti.RegClass:$rs2,
884 def : Pat<(vop (vti.Vector vti.RegClass:$rs1),
885 (vti.Vector (SplatPat (XLenVT GPR:$rs2)))),
887 (vti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs1, GPR:$rs2,
897 // 7.4. Vector Unit-Stride Instructions
903 defm : VPatUSLoadStoreSDNode<vti.Vector, vti.Log2SEW, vti.LMul,
908 defm : VPatUSLoadStoreWholeVRSDNode<vti.Vector, vti.Log2SEW, vti.LMul,
913 defm : VPatUSLoadStoreWholeVRSDNode<vti.Vector, vti.Log2SEW, vti.LMul,
919 // 11. Vector Integer Arithmetic Instructions
921 // 11.1. Vector Single-Width Integer Add and Subtract
932 def : Pat<(sub (vti.Vector (SplatPat (XLenVT GPR:$rs2))),
933 (vti.Vector vti.RegClass:$rs1)),
935 (vti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs1, GPR:$rs2,
937 def : Pat<(sub (vti.Vector (SplatPat_simm5 simm5:$rs2)),
938 (vti.Vector vti.RegClass:$rs1)),
940 (vti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs1,
945 // 11.2. Vector Widening Integer Add and Subtract
960 def : Pat<(shl (wti.Vector (sext_oneuse (vti.Vector vti.RegClass:$rs1))),
961 (wti.Vector (riscv_vmv_v_x_vl (wti.Vector undef), 1, (XLenVT srcvalue)))),
963 (wti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs1, vti.RegClass:$rs1,
965 def : Pat<(shl (wti.Vector (zext_oneuse (vti.Vector vti.RegClass:$rs1))),
966 (wti.Vector (riscv_vmv_v_x_vl (wti.Vector undef), 1, (XLenVT srcvalue)))),
968 (wti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs1, vti.RegClass:$rs1,
970 def : Pat<(shl (wti.Vector (anyext_oneuse (vti.Vector vti.RegClass:$rs1))),
971 (wti.Vector (riscv_vmv_v_x_vl (wti.Vector undef), 1, (XLenVT srcvalue)))),
973 (wti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs1, vti.RegClass:$rs1,
975 …def : Pat<(shl (wti.Vector (riscv_sext_vl_oneuse (vti.Vector vti.RegClass:$rs1), (vti.Mask V0), VL…
976 (wti.Vector (riscv_vmv_v_x_vl (wti.Vector undef), 1, (XLenVT srcvalue)))),
978 (wti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs1, vti.RegClass:$rs1,
980 …def : Pat<(shl (wti.Vector (riscv_zext_vl_oneuse (vti.Vector vti.RegClass:$rs1), (vti.Mask V0), VL…
981 (wti.Vector (riscv_vmv_v_x_vl (wti.Vector undef), 1, (XLenVT srcvalue)))),
983 (wti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs1, vti.RegClass:$rs1,
988 // 11.3. Vector Integer Extension
1002 // 11.5. Vector Bitwise Logical Instructions
1007 // 11.6. Vector Single-Width Bit Shift Instructions
1015 def : Pat<(shl (vti.Vector vti.RegClass:$rs1),
1016 (vti.Vector (riscv_vmv_v_x_vl (vti.Vector undef), 1, (XLenVT srcvalue)))),
1018 (vti.Vector (IMPLICIT_DEF)), vti.RegClass:$rs1,
1023 // 11.8. Vector Integer Comparison Instructions
1058 // 11.9. Vector Integer Min/Max Instructions
1064 // 11.10. Vector Single-Width Integer Multiply Instructions
1075 // 11.11. Vector Integer Divide Instructions
1087 (vti.Vector
1089 (srem (wti.Vector (sext_oneuse (vti.Vector vti.RegClass:$rs1))),
1090 (wti.Vector (sext_oneuse (vti.Vector vti.RegClass:$rs2)))),
1093 (vti.Vector (IMPLICIT_DEF)),
1098 // 11.12. Vector Widening Integer Multiply Instructions
1112 // 11.13 Vector Single-Width Integer Multiply-Add Instructions.
1116 // 11.14 Vector Widening Integer Multiply-Add Instructions
1125 // 11.15. Vector Integer Merge Instructions
1128 def : Pat<(vti.Vector (vselect (vti.Mask V0), vti.RegClass:$rs1,
1131 (vti.Vector (IMPLICIT_DEF)),
1135 def : Pat<(vti.Vector (vselect (vti.Mask V0), (SplatPat XLenVT:$rs1),
1138 (vti.Vector (IMPLICIT_DEF)),
1141 def : Pat<(vti.Vector (vselect (vti.Mask V0), (SplatPat_simm5 simm5:$rs1),
1144 (vti.Vector (IMPLICIT_DEF)),
1149 // 12. Vector Fixed-Point Arithmetic Instructions
1151 // 12.1. Vector Single-Width Saturating Add and Subtract
1157 // 12.2. Vector Single-Width Averaging Add and Subtract
1163 // 15. Vector Mask Instructions
1165 // 15.1. Vector Mask-Register Logical Instructions
1202 // 13. Vector Floating-Point Instructions
1204 // 13.2. Vector Single-Width Floating-Point Add/Subtract Instructions
1209 // 13.3. Vector Widening Floating-Point Add/Subtract Instructions
1213 // 13.4. Vector Single-Width Floating-Point Multiply/Divide Instructions
1218 // 13.5. Vector Widening Floating-Point Multiply Instructions
1221 // 13.6 Vector Single-Width Floating-Point Fused Multiply-Add Instructions.
1227 def : Pat<(fvti.Vector (any_fma fvti.RegClass:$rs1, fvti.RegClass:$rd,
1235 def : Pat<(fvti.Vector (any_fma fvti.RegClass:$rs1, fvti.RegClass:$rd,
1243 def : Pat<(fvti.Vector (any_fma (fneg fvti.RegClass:$rs1), fvti.RegClass:$rd,
1251 def : Pat<(fvti.Vector (any_fma (fneg fvti.RegClass:$rs1), fvti.RegClass:$rd,
1262 def : Pat<(fvti.Vector (any_fma (SplatFPOp fvti.ScalarRegClass:$rs1),
1270 def : Pat<(fvti.Vector (any_fma (SplatFPOp fvti.ScalarRegClass:$rs1),
1279 def : Pat<(fvti.Vector (any_fma (SplatFPOp fvti.ScalarRegClass:$rs1),
1287 def : Pat<(fvti.Vector (any_fma (SplatFPOp fvti.ScalarRegClass:$rs1),
1297 def : Pat<(fvti.Vector (any_fma (fneg (SplatFPOp fvti.ScalarRegClass:$rs1)),
1305 def : Pat<(fvti.Vector (any_fma (fneg (SplatFPOp fvti.ScalarRegClass:$rs1)),
1316 // 13.7. Vector Widening Floating-Point Fused Multiply-Add Instructions
1324 // 13.8. Vector Floating-Point Square-Root Instruction
1325 def : Pat<(any_fsqrt (vti.Vector vti.RegClass:$rs2)),
1327 (vti.Vector (IMPLICIT_DEF)),
1334 // 13.12. Vector Floating-Point Sign-Injection Instructions
1335 def : Pat<(fabs (vti.Vector vti.RegClass:$rs)),
1337 (vti.Vector (IMPLICIT_DEF)),
1340 def : Pat<(fneg (vti.Vector vti.RegClass:$rs)),
1342 (vti.Vector (IMPLICIT_DEF)),
1345 def : Pat<(vti.Vector (fcopysign (vti.Vector vti.RegClass:$rs1),
1346 (vti.Vector vti.RegClass:$rs2))),
1348 (vti.Vector (IMPLICIT_DEF)),
1350 def : Pat<(vti.Vector (fcopysign (vti.Vector vti.RegClass:$rs1),
1351 (vti.Vector (SplatFPOp vti.ScalarRegClass:$rs2)))),
1353 (vti.Vector (IMPLICIT_DEF)),
1356 def : Pat<(vti.Vector (fcopysign (vti.Vector vti.RegClass:$rs1),
1357 (vti.Vector (fneg vti.RegClass:$rs2)))),
1359 (vti.Vector (IMPLICIT_DEF)),
1361 def : Pat<(vti.Vector (fcopysign (vti.Vector vti.RegClass:$rs1),
1362 (vti.Vector (fneg (SplatFPOp vti.ScalarRegClass:$rs2))))),
1364 (vti.Vector (IMPLICIT_DEF)),
1369 // 13.11. Vector Floating-Point MIN/MAX Instructions
1373 // 13.13. Vector Floating-Point Compare Instructions
1387 // 11.15. Vector Integer Merge Instructions
1388 // 13.15. Vector Floating-Point Merge Instruction
1392 def : Pat<(fvti.Vector (vselect (fvti.Mask V0), fvti.RegClass:$rs1,
1395 (fvti.Vector (IMPLICIT_DEF)),
1399 def : Pat<(fvti.Vector (vselect (fvti.Mask V0),
1403 (fvti.Vector (IMPLICIT_DEF)),
1406 def : Pat<(fvti.Vector (vselect (fvti.Mask V0),
1410 (fvti.Vector (IMPLICIT_DEF)),
1417 def : Pat<(fvti.Vector (vselect (fvti.Mask V0),
1421 (fvti.Vector (IMPLICIT_DEF)),
1427 // 13.17. Vector Single-Width Floating-Point/Integer Type-Convert Instructions
1450 def : Pat<(fvti.Vector (fpround (fwti.Vector fwti.RegClass:$rs1))),
1452 (fvti.Vector (IMPLICIT_DEF)),
1464 def : Pat<(fvti.Vector (fpround (fwti.Vector fwti.RegClass:$rs1))),
1466 (fvti.Vector (IMPLICIT_DEF)),
1475 // Vector Element Extracts
1482 // other index will have been custom-lowered to slide the vector correctly
1485 def : Pat<(vti.Scalar (extractelt (vti.Vector vti.RegClass:$rs2), 0)),