@@ -7624,22 +7624,54 @@ class sve_int_perm_rev_z<bits<2> sz, bits<4> opc, string asm,
7624
7624
let hasSideEffects = 0;
7625
7625
}
7626
7626
7627
- multiclass sve_int_perm_rev_rbit_z<string asm> {
7627
+ multiclass sve_int_perm_rev_rbit_z<string asm, SDPatternOperator op > {
7628
7628
def _B : sve_int_perm_rev_z<0b00, 0b0111, asm, ZPR8>;
7629
7629
def _H : sve_int_perm_rev_z<0b01, 0b0111, asm, ZPR16>;
7630
7630
def _S : sve_int_perm_rev_z<0b10, 0b0111, asm, ZPR32>;
7631
7631
def _D : sve_int_perm_rev_z<0b11, 0b0111, asm, ZPR64>;
7632
+
7633
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv16i8, op, nxv16i1, nxv16i8, !cast<Instruction>(NAME # _B)>;
7634
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv8i16, op, nxv8i1, nxv8i16, !cast<Instruction>(NAME # _H)>;
7635
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv4i32, op, nxv4i1, nxv4i32, !cast<Instruction>(NAME # _S)>;
7636
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv2i64, op, nxv2i1, nxv2i64, !cast<Instruction>(NAME # _D)>;
7632
7637
}
7633
7638
7634
- multiclass sve_int_perm_rev_revb_z<string asm> {
7639
+ multiclass sve_int_perm_rev_revb_z<string asm, SDPatternOperator op > {
7635
7640
def _H : sve_int_perm_rev_z<0b01, 0b0100, asm, ZPR16>;
7636
7641
def _S : sve_int_perm_rev_z<0b10, 0b0100, asm, ZPR32>;
7637
7642
def _D : sve_int_perm_rev_z<0b11, 0b0100, asm, ZPR64>;
7643
+
7644
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv8i16, op, nxv8i1, nxv8i16, !cast<Instruction>(NAME # _H)>;
7645
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv4i32, op, nxv4i1, nxv4i32, !cast<Instruction>(NAME # _S)>;
7646
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv2i64, op, nxv2i1, nxv2i64, !cast<Instruction>(NAME # _D)>;
7638
7647
}
7639
7648
7640
- multiclass sve_int_perm_rev_revh_z<string asm> {
7649
+ multiclass sve_int_perm_rev_revh_z<string asm, SDPatternOperator op > {
7641
7650
def _S : sve_int_perm_rev_z<0b10, 0b0101, asm, ZPR32>;
7642
7651
def _D : sve_int_perm_rev_z<0b11, 0b0101, asm, ZPR64>;
7652
+
7653
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv4i32, op, nxv4i1, nxv4i32, !cast<Instruction>(NAME # _S)>;
7654
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv2i64, op, nxv2i1, nxv2i64, !cast<Instruction>(NAME # _D)>;
7655
+ }
7656
+
7657
+ multiclass sve_int_perm_rev_revw_z<string asm, SDPatternOperator op> {
7658
+ def _D : sve_int_perm_rev_z<0b11, 0b0110, asm, ZPR64>;
7659
+
7660
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv2i64, op, nxv2i1, nxv2i64, !cast<Instruction>(NAME # _D)>;
7661
+ }
7662
+
7663
+ multiclass sve_int_perm_rev_revd_z<string asm, SDPatternOperator op> {
7664
+ def NAME : sve_int_perm_rev_z<0b00, 0b1110, asm, ZPR128>;
7665
+
7666
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv16i8, op, nxv16i1, nxv16i8, !cast<Instruction>(NAME)>;
7667
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv8i16, op, nxv8i1, nxv8i16, !cast<Instruction>(NAME)>;
7668
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv4i32, op, nxv4i1, nxv4i32, !cast<Instruction>(NAME)>;
7669
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv2i64, op, nxv2i1, nxv2i64, !cast<Instruction>(NAME)>;
7670
+
7671
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv8bf16, op, nxv8i1, nxv8bf16, !cast<Instruction>(NAME)>;
7672
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv8f16, op, nxv8i1, nxv8f16, !cast<Instruction>(NAME)>;
7673
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv4f32, op, nxv4i1, nxv4f32, !cast<Instruction>(NAME)>;
7674
+ def : SVE_1_Op_PassthruUndefZero_Pat<nxv2f64, op, nxv2i1, nxv2f64, !cast<Instruction>(NAME)>;
7643
7675
}
7644
7676
7645
7677
class sve_int_perm_cpy_r<bits<2> sz8_64, string asm, ZPRRegOp zprty,
0 commit comments