Skip to content

Commit 34712c3

Browse files
committed
[Mips] Remove unnecessary casts from some isel patterns. NFC
1 parent 3c5f337 commit 34712c3

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

llvm/lib/Target/Mips/MipsMSAInstrInfo.td

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,7 @@ def vbclr_h : PatFrag<(ops node:$ws, node:$wt),
348348
def vbclr_w : PatFrag<(ops node:$ws, node:$wt),
349349
(and node:$ws, (vnot (shl (vsplat_imm_eq_1), node:$wt)))>;
350350
def vbclr_d : PatFrag<(ops node:$ws, node:$wt),
351-
(and node:$ws, (vnot (shl (v2i64 (vsplat_imm_eq_1)),
352-
node:$wt)))>;
351+
(and node:$ws, (vnot (shl (vsplat_imm_eq_1), node:$wt)))>;
353352

354353
def vbneg_b : PatFrag<(ops node:$ws, node:$wt),
355354
(xor node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>;
@@ -358,8 +357,7 @@ def vbneg_h : PatFrag<(ops node:$ws, node:$wt),
358357
def vbneg_w : PatFrag<(ops node:$ws, node:$wt),
359358
(xor node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>;
360359
def vbneg_d : PatFrag<(ops node:$ws, node:$wt),
361-
(xor node:$ws, (shl (v2i64 (vsplat_imm_eq_1)),
362-
node:$wt))>;
360+
(xor node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>;
363361

364362
def vbset_b : PatFrag<(ops node:$ws, node:$wt),
365363
(or node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>;
@@ -368,8 +366,7 @@ def vbset_h : PatFrag<(ops node:$ws, node:$wt),
368366
def vbset_w : PatFrag<(ops node:$ws, node:$wt),
369367
(or node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>;
370368
def vbset_d : PatFrag<(ops node:$ws, node:$wt),
371-
(or node:$ws, (shl (v2i64 (vsplat_imm_eq_1)),
372-
node:$wt))>;
369+
(or node:$ws, (shl (vsplat_imm_eq_1), node:$wt))>;
373370

374371
def muladd : PatFrag<(ops node:$wd, node:$ws, node:$wt),
375372
(add node:$wd, (mul node:$ws, node:$wt))>;
@@ -3838,7 +3835,7 @@ multiclass MSABitPats<SDNode Node, string Insn> {
38383835
def : MSABitPat<Node, v16i8, !cast<MSAInst>(Insn#_B), vsplati8imm7>;
38393836
def : MSABitPat<Node, v8i16, !cast<MSAInst>(Insn#_H), vsplati16imm15>;
38403837
def : MSABitPat<Node, v4i32, !cast<MSAInst>(Insn#_W), vsplati32imm31>;
3841-
def : MSAPat<(Node v2i64:$ws, (shl (v2i64 (vsplat_imm_eq_1)),
3838+
def : MSAPat<(Node v2i64:$ws, (shl (vsplat_imm_eq_1),
38423839
(vsplati64imm63 v2i64:$wt))),
38433840
(v2i64 (!cast<MSAInst>(Insn#_D) v2i64:$ws, v2i64:$wt))>;
38443841
}
@@ -3858,7 +3855,7 @@ def : MSAPat<(and v8i16:$ws, (vnot (shl (vsplat_imm_eq_1),
38583855
def : MSAPat<(and v4i32:$ws, (vnot (shl (vsplat_imm_eq_1),
38593856
(vsplati32imm31 v4i32:$wt)))),
38603857
(v4i32 (BCLR_W v4i32:$ws, v4i32:$wt))>;
3861-
def : MSAPat<(and v2i64:$ws, (vnot (shl (v2i64 (vsplat_imm_eq_1)),
3858+
def : MSAPat<(and v2i64:$ws, (vnot (shl (vsplat_imm_eq_1),
38623859
(vsplati64imm63 v2i64:$wt)))),
38633860
(v2i64 (BCLR_D v2i64:$ws, v2i64:$wt))>;
38643861

0 commit comments

Comments
 (0)