@@ -4685,8 +4685,30 @@ class sve_int_un_pred_arit<bits<2> sz8_64, bits<4> opc,
4685
4685
let hasSideEffects = 0;
4686
4686
}
4687
4687
4688
- multiclass sve_int_un_pred_arit_0<bits<3> opc, string asm,
4689
- SDPatternOperator op> {
4688
+ class sve_int_un_pred_arit_z<bits<2> sz8_64, bits<4> opc,
4689
+ string asm, ZPRRegOp zprty>
4690
+ : I<(outs zprty:$Zd), (ins PPR3bAny:$Pg, zprty:$Zn),
4691
+ asm, "\t$Zd, $Pg/z, $Zn",
4692
+ "",
4693
+ []>, Sched<[]> {
4694
+ bits<3> Pg;
4695
+ bits<5> Zd;
4696
+ bits<5> Zn;
4697
+ let Inst{31-24} = 0b00000100;
4698
+ let Inst{23-22} = sz8_64;
4699
+ let Inst{21-20} = 0b00;
4700
+ let Inst{19} = opc{0};
4701
+ let Inst{18-16} = opc{3-1};
4702
+ let Inst{15-13} = 0b101;
4703
+ let Inst{12-10} = Pg;
4704
+ let Inst{9-5} = Zn;
4705
+ let Inst{4-0} = Zd;
4706
+
4707
+ let hasSideEffects = 0;
4708
+ }
4709
+
4710
+ multiclass sve_int_un_pred_arit<bits<3> opc, string asm,
4711
+ SDPatternOperator op> {
4690
4712
def _B : sve_int_un_pred_arit<0b00, { opc, 0b0 }, asm, ZPR8>,
4691
4713
SVEPseudo2Instr<NAME # _B, 1>;
4692
4714
def _H : sve_int_un_pred_arit<0b01, { opc, 0b0 }, asm, ZPR16>,
@@ -4712,8 +4734,15 @@ multiclass sve_int_un_pred_arit_0<bits<3> opc, string asm,
4712
4734
defm : SVE_1_Op_PassthruUndef_Pat<nxv2i64, op, nxv2i1, nxv2i64, !cast<Pseudo>(NAME # _D_UNDEF)>;
4713
4735
}
4714
4736
4715
- multiclass sve_int_un_pred_arit_0_h<bits<3> opc, string asm,
4716
- SDPatternOperator op> {
4737
+ multiclass sve_int_un_pred_arit_z<bits<3> opc, string asm> {
4738
+ def _B : sve_int_un_pred_arit_z<0b00, { opc, 0b0 }, asm, ZPR8>;
4739
+ def _H : sve_int_un_pred_arit_z<0b01, { opc, 0b0 }, asm, ZPR16>;
4740
+ def _S : sve_int_un_pred_arit_z<0b10, { opc, 0b0 }, asm, ZPR32>;
4741
+ def _D : sve_int_un_pred_arit_z<0b11, { opc, 0b0 }, asm, ZPR64>;
4742
+ }
4743
+
4744
+ multiclass sve_int_un_pred_arit_h<bits<3> opc, string asm,
4745
+ SDPatternOperator op> {
4717
4746
def _H : sve_int_un_pred_arit<0b01, { opc, 0b0 }, asm, ZPR16>,
4718
4747
SVEPseudo2Instr<NAME # _H, 1>;
4719
4748
def _S : sve_int_un_pred_arit<0b10, { opc, 0b0 }, asm, ZPR32>,
@@ -4734,8 +4763,14 @@ multiclass sve_int_un_pred_arit_0_h<bits<3> opc, string asm,
4734
4763
defm : SVE_InReg_Extend_PassthruUndef<nxv2i64, op, nxv2i1, nxv2i8, !cast<Pseudo>(NAME # _D_UNDEF)>;
4735
4764
}
4736
4765
4737
- multiclass sve_int_un_pred_arit_0_w<bits<3> opc, string asm,
4738
- SDPatternOperator op> {
4766
+ multiclass sve_int_un_pred_arit_h_z<bits<3> opc, string asm> {
4767
+ def _H : sve_int_un_pred_arit_z<0b01, { opc, 0b0 }, asm, ZPR16>;
4768
+ def _S : sve_int_un_pred_arit_z<0b10, { opc, 0b0 }, asm, ZPR32>;
4769
+ def _D : sve_int_un_pred_arit_z<0b11, { opc, 0b0 }, asm, ZPR64>;
4770
+ }
4771
+
4772
+ multiclass sve_int_un_pred_arit_w<bits<3> opc, string asm,
4773
+ SDPatternOperator op> {
4739
4774
def _S : sve_int_un_pred_arit<0b10, { opc, 0b0 }, asm, ZPR32>,
4740
4775
SVEPseudo2Instr<NAME # _S, 1>;
4741
4776
def _D : sve_int_un_pred_arit<0b11, { opc, 0b0 }, asm, ZPR64>,
@@ -4751,8 +4786,13 @@ multiclass sve_int_un_pred_arit_0_w<bits<3> opc, string asm,
4751
4786
defm : SVE_InReg_Extend_PassthruUndef<nxv2i64, op, nxv2i1, nxv2i16, !cast<Pseudo>(NAME # _D_UNDEF)>;
4752
4787
}
4753
4788
4754
- multiclass sve_int_un_pred_arit_0_d<bits<3> opc, string asm,
4755
- SDPatternOperator op> {
4789
+ multiclass sve_int_un_pred_arit_w_z<bits<3> opc, string asm> {
4790
+ def _S : sve_int_un_pred_arit_z<0b10, { opc, 0b0 }, asm, ZPR32>;
4791
+ def _D : sve_int_un_pred_arit_z<0b11, { opc, 0b0 }, asm, ZPR64>;
4792
+ }
4793
+
4794
+ multiclass sve_int_un_pred_arit_d<bits<3> opc, string asm,
4795
+ SDPatternOperator op> {
4756
4796
def _D : sve_int_un_pred_arit<0b11, { opc, 0b0 }, asm, ZPR64>,
4757
4797
SVEPseudo2Instr<NAME # _D, 1>;
4758
4798
@@ -4763,8 +4803,8 @@ multiclass sve_int_un_pred_arit_0_d<bits<3> opc, string asm,
4763
4803
defm : SVE_InReg_Extend_PassthruUndef<nxv2i64, op, nxv2i1, nxv2i32, !cast<Pseudo>(NAME # _D_UNDEF)>;
4764
4804
}
4765
4805
4766
- multiclass sve_int_un_pred_arit_1 <bits<3> opc, string asm,
4767
- SDPatternOperator op> {
4806
+ multiclass sve_int_un_pred_arit_bitwise <bits<3> opc, string asm,
4807
+ SDPatternOperator op> {
4768
4808
def _B : sve_int_un_pred_arit<0b00, { opc, 0b1 }, asm, ZPR8>,
4769
4809
SVEPseudo2Instr<NAME # _B, 1>;
4770
4810
def _H : sve_int_un_pred_arit<0b01, { opc, 0b1 }, asm, ZPR16>,
@@ -4790,7 +4830,15 @@ multiclass sve_int_un_pred_arit_1<bits<3> opc, string asm,
4790
4830
defm : SVE_1_Op_PassthruUndef_Pat<nxv2i64, op, nxv2i1, nxv2i64, !cast<Pseudo>(NAME # _D_UNDEF)>;
4791
4831
}
4792
4832
4793
- multiclass sve_int_un_pred_arit_1_fp<bits<3> opc, string asm, SDPatternOperator op> {
4833
+ multiclass sve_int_un_pred_arit_bitwise_z<bits<3> opc, string asm> {
4834
+ def _B : sve_int_un_pred_arit_z<0b00, { opc, 0b1 }, asm, ZPR8>;
4835
+ def _H : sve_int_un_pred_arit_z<0b01, { opc, 0b1 }, asm, ZPR16>;
4836
+ def _S : sve_int_un_pred_arit_z<0b10, { opc, 0b1 }, asm, ZPR32>;
4837
+ def _D : sve_int_un_pred_arit_z<0b11, { opc, 0b1 }, asm, ZPR64>;
4838
+ }
4839
+
4840
+ multiclass sve_int_un_pred_arit_bitwise_fp<bits<3> opc, string asm,
4841
+ SDPatternOperator op> {
4794
4842
def _H : sve_int_un_pred_arit<0b01, { opc, 0b1 }, asm, ZPR16>,
4795
4843
SVEPseudo2Instr<NAME # _H, 1>;
4796
4844
def _S : sve_int_un_pred_arit<0b10, { opc, 0b1 }, asm, ZPR32>,
@@ -4817,6 +4865,12 @@ multiclass sve_int_un_pred_arit_1_fp<bits<3> opc, string asm, SDPatternOperator
4817
4865
defm : SVE_1_Op_PassthruUndef_Pat<nxv2f64, op, nxv2i1, nxv2f64, !cast<Pseudo>(NAME # _D_UNDEF)>;
4818
4866
}
4819
4867
4868
+ multiclass sve_int_un_pred_arit_bitwise_fp_z<bits<3> opc, string asm> {
4869
+ def _H : sve_int_un_pred_arit_z<0b01, { opc, 0b1 }, asm, ZPR16>;
4870
+ def _S : sve_int_un_pred_arit_z<0b10, { opc, 0b1 }, asm, ZPR32>;
4871
+ def _D : sve_int_un_pred_arit_z<0b11, { opc, 0b1 }, asm, ZPR64>;
4872
+ }
4873
+
4820
4874
//===----------------------------------------------------------------------===//
4821
4875
// SVE Integer Wide Immediate - Unpredicated Group
4822
4876
//===----------------------------------------------------------------------===//
0 commit comments