mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
[mips][msa] Pseudo instructions require HasMSA too. Inherit from MSAPseudo instead of MipsPseudo
There's no test case for this commit. This is because it is doubtful that the incorrect behaviour can actually trigger. When MSA is not enabled, the type legalizer should have eliminated all occurrences of patterns the affected pseudo-instruction could possibly match before instruction selection occurs. llvm-svn: 195252
This commit is contained in:
parent
29b990c693
commit
9a39d9e82f
@ -23,7 +23,7 @@ class MSASpecial : MSAInst {
|
||||
let Inst{31-26} = 0b000000;
|
||||
}
|
||||
|
||||
class PseudoMSA<dag outs, dag ins, list<dag> pattern,
|
||||
class MSAPseudo<dag outs, dag ins, list<dag> pattern,
|
||||
InstrItinClass itin = IIPseudo>:
|
||||
MipsPseudo<outs, ins, pattern, itin> {
|
||||
let Predicates = [HasMSA];
|
||||
|
@ -1273,7 +1273,7 @@ class MSA_ELM_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||
|
||||
class MSA_COPY_PSEUDO_BASE<SDPatternOperator OpNode, ValueType VecTy,
|
||||
RegisterClass RCD, RegisterClass RCWS> :
|
||||
MipsPseudo<(outs RCD:$wd), (ins RCWS:$ws, uimm4:$n),
|
||||
MSAPseudo<(outs RCD:$wd), (ins RCWS:$ws, uimm4:$n),
|
||||
[(set RCD:$wd, (OpNode (VecTy RCWS:$ws), immZExt4:$n))]> {
|
||||
bit usesCustomInserter = 1;
|
||||
}
|
||||
@ -1344,7 +1344,7 @@ class MSA_2R_FILL_DESC_BASE<string instr_asm, ValueType VT,
|
||||
|
||||
class MSA_2R_FILL_PSEUDO_BASE<ValueType VT, SDPatternOperator OpNode,
|
||||
RegisterClass RCWD, RegisterClass RCWS = RCWD> :
|
||||
MipsPseudo<(outs RCWD:$wd), (ins RCWS:$fs),
|
||||
MSAPseudo<(outs RCWD:$wd), (ins RCWS:$fs),
|
||||
[(set RCWD:$wd, (OpNode RCWS:$fs))]> {
|
||||
let usesCustomInserter = 1;
|
||||
}
|
||||
@ -1468,7 +1468,7 @@ class MSA_INSERT_DESC_BASE<string instr_asm, SDPatternOperator OpNode,
|
||||
|
||||
class MSA_INSERT_PSEUDO_BASE<SDPatternOperator OpNode, ValueType Ty,
|
||||
RegisterOperand ROWD, RegisterOperand ROFS> :
|
||||
MipsPseudo<(outs ROWD:$wd), (ins ROWD:$wd_in, uimm6:$n, ROFS:$fs),
|
||||
MSAPseudo<(outs ROWD:$wd), (ins ROWD:$wd_in, uimm6:$n, ROFS:$fs),
|
||||
[(set ROWD:$wd, (OpNode (Ty ROWD:$wd_in), ROFS:$fs,
|
||||
immZExt6:$n))]> {
|
||||
bit usesCustomInserter = 1;
|
||||
@ -1514,7 +1514,7 @@ class MSA_ELM_SPLAT_DESC_BASE<string instr_asm, SplatComplexPattern SplatImm,
|
||||
class MSA_VEC_PSEUDO_BASE<SDPatternOperator OpNode, RegisterOperand ROWD,
|
||||
RegisterOperand ROWS = ROWD,
|
||||
RegisterOperand ROWT = ROWD> :
|
||||
MipsPseudo<(outs ROWD:$wd), (ins ROWS:$ws, ROWT:$wt),
|
||||
MSAPseudo<(outs ROWD:$wd), (ins ROWS:$ws, ROWT:$wt),
|
||||
[(set ROWD:$wd, (OpNode ROWS:$ws, ROWT:$wt))]>;
|
||||
|
||||
class ADD_A_B_DESC : MSA_3R_DESC_BASE<"add_a.b", int_mips_add_a_b, MSA128BOpnd>,
|
||||
@ -2040,10 +2040,10 @@ class FEXP2_W_DESC : MSA_3RF_DESC_BASE<"fexp2.w", mul_fexp2, MSA128WOpnd>;
|
||||
class FEXP2_D_DESC : MSA_3RF_DESC_BASE<"fexp2.d", mul_fexp2, MSA128DOpnd>;
|
||||
let usesCustomInserter = 1 in {
|
||||
class FEXP2_W_1_PSEUDO_DESC :
|
||||
MipsPseudo<(outs MSA128W:$wd), (ins MSA128W:$ws),
|
||||
MSAPseudo<(outs MSA128W:$wd), (ins MSA128W:$ws),
|
||||
[(set MSA128W:$wd, (fexp2 MSA128W:$ws))]>;
|
||||
class FEXP2_D_1_PSEUDO_DESC :
|
||||
MipsPseudo<(outs MSA128D:$wd), (ins MSA128D:$ws),
|
||||
MSAPseudo<(outs MSA128D:$wd), (ins MSA128D:$ws),
|
||||
[(set MSA128D:$wd, (fexp2 MSA128D:$ws))]>;
|
||||
}
|
||||
|
||||
@ -2803,7 +2803,7 @@ def BNZ_V : BNZ_V_ENC, BNZ_V_DESC;
|
||||
def BSEL_V : BSEL_V_ENC, BSEL_V_DESC;
|
||||
|
||||
class MSA_BSEL_PSEUDO_BASE<RegisterOperand RO, ValueType Ty> :
|
||||
MipsPseudo<(outs RO:$wd), (ins RO:$wd_in, RO:$ws, RO:$wt),
|
||||
MSAPseudo<(outs RO:$wd), (ins RO:$wd_in, RO:$ws, RO:$wt),
|
||||
[(set RO:$wd, (Ty (vselect RO:$wd_in, RO:$ws, RO:$wt)))]>,
|
||||
PseudoInstExpansion<(BSEL_V MSA128BOpnd:$wd, MSA128BOpnd:$wd_in,
|
||||
MSA128BOpnd:$ws, MSA128BOpnd:$wt)> {
|
||||
@ -3494,7 +3494,7 @@ def ST_FD : MSAPat<(store (v2f64 MSA128D:$ws), addrRegImm:$addr),
|
||||
class MSA_FABS_PSEUDO_DESC_BASE<RegisterOperand ROWD,
|
||||
RegisterOperand ROWS = ROWD,
|
||||
InstrItinClass itin = NoItinerary> :
|
||||
MipsPseudo<(outs ROWD:$wd),
|
||||
MSAPseudo<(outs ROWD:$wd),
|
||||
(ins ROWS:$ws),
|
||||
[(set ROWD:$wd, (fabs ROWS:$ws))]> {
|
||||
InstrItinClass Itinerary = itin;
|
||||
|
Loading…
Reference in New Issue
Block a user