Skip to content

Commit ceb9da5

Browse files
committed
[mips] Add missing schedinfo for MSA and ASE instructions
llvm-svn: 364757
1 parent c0121bf commit ceb9da5

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

llvm/lib/Target/Mips/MipsDSPInstrInfo.td

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,7 @@ class MTHI_DESC_BASE<string instr_asm, RegisterOperand RO, InstrItinClass itin>
515515

516516
class BPOSGE32_PSEUDO_DESC_BASE<SDPatternOperator OpNode, InstrItinClass itin> :
517517
MipsPseudo<(outs GPR32Opnd:$dst), (ins), [(set GPR32Opnd:$dst, (OpNode))]> {
518+
bit hasNoSchedulingInfo = 1;
518519
bit usesCustomInserter = 1;
519520
}
520521

llvm/lib/Target/Mips/MipsMSAInstrInfo.td

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1239,6 +1239,7 @@ class MSA_COPY_PSEUDO_BASE<SDPatternOperator OpNode, ValueType VecTy,
12391239
MSAPseudo<(outs RCD:$wd), (ins RCWS:$ws, ImmOp:$n),
12401240
[(set RCD:$wd, (OpNode (VecTy RCWS:$ws), Imm:$n))]> {
12411241
bit usesCustomInserter = 1;
1242+
bit hasNoSchedulingInfo = 1;
12421243
}
12431244

12441245
class MSA_I5_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
@@ -1446,6 +1447,7 @@ class MSA_INSERT_VIDX_PSEUDO_BASE<SDPatternOperator OpNode, ValueType Ty,
14461447
[(set ROWD:$wd, (OpNode (Ty ROWD:$wd_in), ROFS:$fs,
14471448
ROIdx:$n))]> {
14481449
bit usesCustomInserter = 1;
1450+
bit hasNoSchedulingInfo = 1;
14491451
string Constraints = "$wd = $wd_in";
14501452
}
14511453

@@ -2043,7 +2045,7 @@ class FEXDO_W_DESC : MSA_3RF_DESC_BASE<"fexdo.w", int_mips_fexdo_w,
20432045
// 1.0 when we only need to match ISD::FEXP2.
20442046
class FEXP2_W_DESC : MSA_3RF_DESC_BASE<"fexp2.w", mul_fexp2, MSA128WOpnd>;
20452047
class FEXP2_D_DESC : MSA_3RF_DESC_BASE<"fexp2.d", mul_fexp2, MSA128DOpnd>;
2046-
let usesCustomInserter = 1 in {
2048+
let usesCustomInserter = 1, hasNoSchedulingInfo = 1 in {
20472049
class FEXP2_W_1_PSEUDO_DESC :
20482050
MSAPseudo<(outs MSA128W:$wd), (ins MSA128W:$ws),
20492051
[(set MSA128W:$wd, (fexp2 MSA128W:$ws))]>;
@@ -3737,6 +3739,7 @@ class MSA_CBRANCH_PSEUDO_DESC_BASE<SDPatternOperator OpNode, ValueType TyNode,
37373739
(ins RCWS:$ws),
37383740
[(set GPR32:$dst, (OpNode (TyNode RCWS:$ws)))]> {
37393741
bit usesCustomInserter = 1;
3742+
bit hasNoSchedulingInfo = 1;
37403743
}
37413744

37423745
def SNZ_B_PSEUDO : MSA_CBRANCH_PSEUDO_DESC_BASE<MipsVAllNonZero, v16i8,
@@ -3773,7 +3776,7 @@ let ASEPredicate = [HasMSA] in {
37733776
[(set MSA128F16:$ws, (f16 (load addrimm10:$addr)))]>;
37743777
}
37753778

3776-
let usesCustomInserter = 1 in {
3779+
let usesCustomInserter = 1, hasNoSchedulingInfo = 1 in {
37773780
def MSA_FP_EXTEND_W_PSEUDO :
37783781
MipsPseudo<(outs FGR32Opnd:$fd), (ins MSA128F16:$ws),
37793782
[(set FGR32Opnd:$fd, (f32 (fpextend MSA128F16:$ws)))]>;

llvm/lib/Target/Mips/MipsScheduleP5600.td

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,8 @@ def : InstRW<[P5600WriteMSAShortInt], (instregex "^(BCLR|BCLRI)_[BHWD]$")>;
288288
def : InstRW<[P5600WriteMSAShortInt], (instregex "^(BNEG|BNEGI)_[BHWD]$")>;
289289
def : InstRW<[P5600WriteMSAShortInt], (instregex "^(BSEL_V|BSELI_B)$")>;
290290
def : InstRW<[P5600WriteMSAShortInt], (instregex "^BMN*Z.*$")>;
291+
def : InstRW<[P5600WriteMSAShortInt],
292+
(instregex "^BSEL_(H|W|D|FW|FD)_PSEUDO$")>;
291293

292294
// pcnt.[bhwd], sat_s.[bhwd], sat_u.bhwd]
293295
def : InstRW<[P5600WriteMSAOther3], (instregex "^PCNT_[BHWD]$")>;
@@ -335,6 +337,10 @@ def : InstRW<[P5600WriteMSAShortLogic], (instregex "^MOVE_V$")>;
335337
def : InstRW<[P5600WriteMSAShortLogic], (instregex "^LDI_[BHWD]$")>;
336338
def : InstRW<[P5600WriteMSAShortLogic], (instregex "^(AND|OR|[XN]OR)_V$")>;
337339
def : InstRW<[P5600WriteMSAShortLogic], (instregex "^(AND|OR|[XN]OR)I_B$")>;
340+
def : InstRW<[P5600WriteMSAShortLogic],
341+
(instregex "^(AND|OR|[XN]OR)_V_[DHW]_PSEUDO$")>;
342+
def : InstRW<[P5600WriteMSAShortLogic], (instregex "^FILL_F(D|W)_PSEUDO$")>;
343+
def : InstRW<[P5600WriteMSAShortLogic], (instregex "^INSERT_F(D|W)_PSEUDO$")>;
338344

339345
// fexp2_w, fexp2_d
340346
def : InstRW<[P5600WriteFPUS], (instregex "^FEXP2_(W|D)$")>;

0 commit comments

Comments
 (0)