@@ -7548,6 +7548,181 @@ class sve_bfloat_convert<bit N, string asm>
7548
7548
let ElementSize = ElementSizeS;
7549
7549
}
7550
7550
7551
+ //===----------------------------------------------------------------------===//
7552
+ // SVE Integer Matrix Multiply Group
7553
+ //===----------------------------------------------------------------------===//
7554
+
7555
+ class sve_int_matmul<bits<2> uns, string asm>
7556
+ : I<(outs ZPR32:$Zda), (ins ZPR32:$_Zda, ZPR8:$Zn, ZPR8:$Zm), asm,
7557
+ "\t$Zda, $Zn, $Zm", "", []>, Sched<[]> {
7558
+ bits<5> Zda;
7559
+ bits<5> Zn;
7560
+ bits<5> Zm;
7561
+ let Inst{31-24} = 0b01000101;
7562
+ let Inst{23-22} = uns;
7563
+ let Inst{21} = 0;
7564
+ let Inst{20-16} = Zm;
7565
+ let Inst{15-10} = 0b100110;
7566
+ let Inst{9-5} = Zn;
7567
+ let Inst{4-0} = Zda;
7568
+
7569
+ let Constraints = "$Zda = $_Zda";
7570
+ let DestructiveInstType = DestructiveOther;
7571
+ let ElementSize = ZPR32.ElementSize;
7572
+ }
7573
+
7574
+ //===----------------------------------------------------------------------===//
7575
+ // SVE Integer Dot Product Mixed Sign Group
7576
+ //===----------------------------------------------------------------------===//
7577
+
7578
+ class sve_int_dot_mixed<string asm>
7579
+ : I<(outs ZPR32:$Zda), (ins ZPR32:$_Zda, ZPR8:$Zn, ZPR8:$Zm), asm,
7580
+ "\t$Zda, $Zn, $Zm", "", []>, Sched<[]> {
7581
+ bits<5> Zda;
7582
+ bits<5> Zn;
7583
+ bits<5> Zm;
7584
+ let Inst{31-21} = 0b01000100100;
7585
+ let Inst{20-16} = Zm;
7586
+ let Inst{15-10} = 0b011110;
7587
+ let Inst{9-5} = Zn;
7588
+ let Inst{4-0} = Zda;
7589
+
7590
+ let Constraints = "$Zda = $_Zda";
7591
+ let DestructiveInstType = DestructiveOther;
7592
+ let ElementSize = ZPR32.ElementSize;
7593
+ }
7594
+
7595
+ //===----------------------------------------------------------------------===//
7596
+ // SVE Integer Dot Product Mixed Sign - Indexed Group
7597
+ //===----------------------------------------------------------------------===//
7598
+
7599
+ class sve_int_dot_mixed_indexed<bit U, string asm>
7600
+ : I<(outs ZPR32:$Zda), (ins ZPR32:$_Zda, ZPR8:$Zn, ZPR3b8:$Zm, VectorIndexS:$idx),
7601
+ asm, "\t$Zda, $Zn, $Zm$idx", "", []>, Sched<[]> {
7602
+ bits<5> Zda;
7603
+ bits<5> Zn;
7604
+ bits<3> Zm;
7605
+ bits<2> idx;
7606
+ let Inst{31-21} = 0b01000100101;
7607
+ let Inst{20-19} = idx;
7608
+ let Inst{18-16} = Zm;
7609
+ let Inst{15-11} = 0b00011;
7610
+ let Inst{10} = U;
7611
+ let Inst{9-5} = Zn;
7612
+ let Inst{4-0} = Zda;
7613
+
7614
+ let Constraints = "$Zda = $_Zda";
7615
+ let DestructiveInstType = DestructiveOther;
7616
+ let ElementSize = ZPR32.ElementSize;
7617
+ }
7618
+
7619
+ //===----------------------------------------------------------------------===//
7620
+ // SVE Floating Point Matrix Multiply Accumulate Group
7621
+ //===----------------------------------------------------------------------===//
7622
+
7623
+ class sve_fp_matrix_mla<bit sz, string asm, ZPRRegOp zprty>
7624
+ : I<(outs zprty:$Zda), (ins zprty:$_Zda, zprty:$Zn, zprty:$Zm),
7625
+ asm, "\t$Zda, $Zn, $Zm", "", []>, Sched<[]> {
7626
+ bits<5> Zda;
7627
+ bits<5> Zn;
7628
+ bits<5> Zm;
7629
+ let Inst{31-23} = 0b011001001;
7630
+ let Inst{22} = sz;
7631
+ let Inst{21} = 1;
7632
+ let Inst{20-16} = Zm;
7633
+ let Inst{15-10} = 0b111001;
7634
+ let Inst{9-5} = Zn;
7635
+ let Inst{4-0} = Zda;
7636
+
7637
+ let Constraints = "$Zda = $_Zda";
7638
+ let DestructiveInstType = DestructiveOther;
7639
+ let ElementSize = zprty.ElementSize;
7640
+ }
7641
+
7642
+ //===----------------------------------------------------------------------===//
7643
+ // SVE Memory - Contiguous Load And Replicate 256-bit Group
7644
+ //===----------------------------------------------------------------------===//
7645
+
7646
+ class sve_mem_ldor_si<bits<2> sz, string asm, RegisterOperand VecList>
7647
+ : I<(outs VecList:$Zt), (ins PPR3bAny:$Pg, GPR64sp:$Rn, simm4s32:$imm4),
7648
+ asm, "\t$Zt, $Pg/z, [$Rn, $imm4]", "", []>, Sched<[]> {
7649
+ bits<5> Zt;
7650
+ bits<5> Rn;
7651
+ bits<3> Pg;
7652
+ bits<4> imm4;
7653
+ let Inst{31-25} = 0b1010010;
7654
+ let Inst{24-23} = sz;
7655
+ let Inst{22-20} = 0b010;
7656
+ let Inst{19-16} = imm4;
7657
+ let Inst{15-13} = 0b001;
7658
+ let Inst{12-10} = Pg;
7659
+ let Inst{9-5} = Rn;
7660
+ let Inst{4-0} = Zt;
7661
+
7662
+ let mayLoad = 1;
7663
+ }
7664
+
7665
+ multiclass sve_mem_ldor_si<bits<2> sz, string asm, RegisterOperand listty,
7666
+ ZPRRegOp zprty> {
7667
+ def NAME : sve_mem_ldor_si<sz, asm, listty>;
7668
+ def : InstAlias<asm # "\t$Zt, $Pg/z, [$Rn]",
7669
+ (!cast<Instruction>(NAME) listty:$Zt, PPR3bAny:$Pg, GPR64sp:$Rn, 0), 1>;
7670
+ def : InstAlias<asm # "\t$Zt, $Pg/z, [$Rn]",
7671
+ (!cast<Instruction>(NAME) zprty:$Zt, PPR3bAny:$Pg, GPR64sp:$Rn, 0), 0>;
7672
+ def : InstAlias<asm # "\t$Zt, $Pg/z, [$Rn, $imm4]",
7673
+ (!cast<Instruction>(NAME) zprty:$Zt, PPR3bAny:$Pg, GPR64sp:$Rn, simm4s32:$imm4), 0>;
7674
+ }
7675
+
7676
+ class sve_mem_ldor_ss<bits<2> sz, string asm, RegisterOperand VecList,
7677
+ RegisterOperand gprty>
7678
+ : I<(outs VecList:$Zt), (ins PPR3bAny:$Pg, GPR64sp:$Rn, gprty:$Rm),
7679
+ asm, "\t$Zt, $Pg/z, [$Rn, $Rm]", "", []>, Sched<[]> {
7680
+ bits<5> Zt;
7681
+ bits<3> Pg;
7682
+ bits<5> Rn;
7683
+ bits<5> Rm;
7684
+ let Inst{31-25} = 0b1010010;
7685
+ let Inst{24-23} = sz;
7686
+ let Inst{22-21} = 0b01;
7687
+ let Inst{20-16} = Rm;
7688
+ let Inst{15-13} = 0;
7689
+ let Inst{12-10} = Pg;
7690
+ let Inst{9-5} = Rn;
7691
+ let Inst{4-0} = Zt;
7692
+
7693
+ let mayLoad = 1;
7694
+ }
7695
+
7696
+ multiclass sve_mem_ldor_ss<bits<2> sz, string asm, RegisterOperand listty,
7697
+ ZPRRegOp zprty, RegisterOperand gprty> {
7698
+ def NAME : sve_mem_ldor_ss<sz, asm, listty, gprty>;
7699
+
7700
+ def : InstAlias<asm # "\t$Zt, $Pg/z, [$Rn, $Rm]",
7701
+ (!cast<Instruction>(NAME) zprty:$Zt, PPR3bAny:$Pg, GPR64sp:$Rn, gprty:$Rm), 0>;
7702
+ }
7703
+
7704
+ //===----------------------------------------------------------------------===//
7705
+ // SVE Interleave 128-bit Elements Group
7706
+ //===----------------------------------------------------------------------===//
7707
+
7708
+ class sve_int_perm_bin_perm_128_zz<bits<2> opc, bit P, string asm>
7709
+ : I<(outs ZPR128:$Zd), (ins ZPR128:$Zn, ZPR128:$Zm),
7710
+ asm, "\t$Zd, $Zn, $Zm",
7711
+ "",
7712
+ []>, Sched<[]> {
7713
+ bits<5> Zd;
7714
+ bits<5> Zm;
7715
+ bits<5> Zn;
7716
+ let Inst{31-21} = 0b00000101101;
7717
+ let Inst{20-16} = Zm;
7718
+ let Inst{15-13} = 0b000;
7719
+ let Inst{12-11} = opc;
7720
+ let Inst{10} = P;
7721
+ let Inst{9-5} = Zn;
7722
+ let Inst{4-0} = Zd;
7723
+ }
7724
+
7725
+
7551
7726
/// Addressing modes
7552
7727
def am_sve_indexed_s4 :ComplexPattern<i64, 2, "SelectAddrModeIndexedSVE<-8,7>", [], [SDNPWantRoot]>;
7553
7728
def am_sve_indexed_s6 :ComplexPattern<i64, 2, "SelectAddrModeIndexedSVE<-32,31>", [], [SDNPWantRoot]>;
0 commit comments