Skip to content

Commit 275bcd0

Browse files
committed
[Mips] Remove some duplicate PatFrags. NFC
1 parent 34712c3 commit 275bcd0

File tree

1 file changed

+20
-38
lines changed

1 file changed

+20
-38
lines changed

llvm/lib/Target/Mips/MipsMSAInstrInfo.td

Lines changed: 20 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -341,32 +341,14 @@ def vsplat_maskr_bits_uimm6
341341
[build_vector, bitconvert]>;
342342

343343

344-
def vbclr_b : PatFrag<(ops node:$ws, node:$wt),
345-
(and node:$ws, (vnot (shl (vsplat_imm_eq_1), node:$wt)))>;
346-
def vbclr_h : PatFrag<(ops node:$ws, node:$wt),
347-
(and node:$ws, (vnot (shl (vsplat_imm_eq_1), node:$wt)))>;
348-
def vbclr_w : PatFrag<(ops node:$ws, node:$wt),
349-
(and node:$ws, (vnot (shl (vsplat_imm_eq_1), node:$wt)))>;
350-
def vbclr_d : PatFrag<(ops node:$ws, node:$wt),
351-
(and node:$ws, (vnot (shl (vsplat_imm_eq_1), node:$wt)))>;
352-
353-
def vbneg_b : PatFrag<(ops node:$ws, node:$wt),
354-
(xor node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>;
355-
def vbneg_h : PatFrag<(ops node:$ws, node:$wt),
356-
(xor node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>;
357-
def vbneg_w : PatFrag<(ops node:$ws, node:$wt),
358-
(xor node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>;
359-
def vbneg_d : PatFrag<(ops node:$ws, node:$wt),
360-
(xor node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>;
361-
362-
def vbset_b : PatFrag<(ops node:$ws, node:$wt),
363-
(or node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>;
364-
def vbset_h : PatFrag<(ops node:$ws, node:$wt),
365-
(or node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>;
366-
def vbset_w : PatFrag<(ops node:$ws, node:$wt),
367-
(or node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>;
368-
def vbset_d : PatFrag<(ops node:$ws, node:$wt),
369-
(or node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>;
344+
def vbclr : PatFrag<(ops node:$ws, node:$wt),
345+
(and node:$ws, (vnot (shl (vsplat_imm_eq_1), node:$wt)))>;
346+
347+
def vbneg : PatFrag<(ops node:$ws, node:$wt),
348+
(xor node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>;
349+
350+
def vbset : PatFrag<(ops node:$ws, node:$wt),
351+
(or node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>;
370352

371353
def muladd : PatFrag<(ops node:$wd, node:$ws, node:$wt),
372354
(add node:$wd, (mul node:$ws, node:$wt))>;
@@ -1583,10 +1565,10 @@ class AVER_U_W_DESC : MSA_3R_DESC_BASE<"aver_u.w", int_mips_aver_u_w,
15831565
class AVER_U_D_DESC : MSA_3R_DESC_BASE<"aver_u.d", int_mips_aver_u_d,
15841566
MSA128DOpnd>, IsCommutable;
15851567

1586-
class BCLR_B_DESC : MSA_3R_DESC_BASE<"bclr.b", vbclr_b, MSA128BOpnd>;
1587-
class BCLR_H_DESC : MSA_3R_DESC_BASE<"bclr.h", vbclr_h, MSA128HOpnd>;
1588-
class BCLR_W_DESC : MSA_3R_DESC_BASE<"bclr.w", vbclr_w, MSA128WOpnd>;
1589-
class BCLR_D_DESC : MSA_3R_DESC_BASE<"bclr.d", vbclr_d, MSA128DOpnd>;
1568+
class BCLR_B_DESC : MSA_3R_DESC_BASE<"bclr.b", vbclr, MSA128BOpnd>;
1569+
class BCLR_H_DESC : MSA_3R_DESC_BASE<"bclr.h", vbclr, MSA128HOpnd>;
1570+
class BCLR_W_DESC : MSA_3R_DESC_BASE<"bclr.w", vbclr, MSA128WOpnd>;
1571+
class BCLR_D_DESC : MSA_3R_DESC_BASE<"bclr.d", vbclr, MSA128DOpnd>;
15901572

15911573
class BCLRI_B_DESC : MSA_BIT_B_DESC_BASE<"bclri.b", and, vsplat_uimm_inv_pow2,
15921574
MSA128BOpnd>;
@@ -1681,10 +1663,10 @@ class BMZI_B_DESC {
16811663
string Constraints = "$wd = $wd_in";
16821664
}
16831665

1684-
class BNEG_B_DESC : MSA_3R_DESC_BASE<"bneg.b", vbneg_b, MSA128BOpnd>;
1685-
class BNEG_H_DESC : MSA_3R_DESC_BASE<"bneg.h", vbneg_h, MSA128HOpnd>;
1686-
class BNEG_W_DESC : MSA_3R_DESC_BASE<"bneg.w", vbneg_w, MSA128WOpnd>;
1687-
class BNEG_D_DESC : MSA_3R_DESC_BASE<"bneg.d", vbneg_d, MSA128DOpnd>;
1666+
class BNEG_B_DESC : MSA_3R_DESC_BASE<"bneg.b", vbneg, MSA128BOpnd>;
1667+
class BNEG_H_DESC : MSA_3R_DESC_BASE<"bneg.h", vbneg, MSA128HOpnd>;
1668+
class BNEG_W_DESC : MSA_3R_DESC_BASE<"bneg.w", vbneg, MSA128WOpnd>;
1669+
class BNEG_D_DESC : MSA_3R_DESC_BASE<"bneg.d", vbneg, MSA128DOpnd>;
16881670

16891671
class BNEGI_B_DESC : MSA_BIT_B_DESC_BASE<"bnegi.b", xor, vsplat_uimm_pow2,
16901672
MSA128BOpnd>;
@@ -1734,10 +1716,10 @@ class BSELI_B_DESC {
17341716
string Constraints = "$wd = $wd_in";
17351717
}
17361718

1737-
class BSET_B_DESC : MSA_3R_DESC_BASE<"bset.b", vbset_b, MSA128BOpnd>;
1738-
class BSET_H_DESC : MSA_3R_DESC_BASE<"bset.h", vbset_h, MSA128HOpnd>;
1739-
class BSET_W_DESC : MSA_3R_DESC_BASE<"bset.w", vbset_w, MSA128WOpnd>;
1740-
class BSET_D_DESC : MSA_3R_DESC_BASE<"bset.d", vbset_d, MSA128DOpnd>;
1719+
class BSET_B_DESC : MSA_3R_DESC_BASE<"bset.b", vbset, MSA128BOpnd>;
1720+
class BSET_H_DESC : MSA_3R_DESC_BASE<"bset.h", vbset, MSA128HOpnd>;
1721+
class BSET_W_DESC : MSA_3R_DESC_BASE<"bset.w", vbset, MSA128WOpnd>;
1722+
class BSET_D_DESC : MSA_3R_DESC_BASE<"bset.d", vbset, MSA128DOpnd>;
17411723

17421724
class BSETI_B_DESC : MSA_BIT_B_DESC_BASE<"bseti.b", or, vsplat_uimm_pow2,
17431725
MSA128BOpnd>;

0 commit comments

Comments
 (0)