Skip to content

Commit

Permalink
[RISCV] Remove Inst bits from Pseudo tablegen class. NFC
Browse files Browse the repository at this point in the history
Pseudods shouldn't have encoding information so these bits should
never be used.
  • Loading branch information
topperc committed Feb 23, 2025
1 parent 40b0619 commit 03610af
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion llvm/lib/Target/RISCV/RISCVInstrFormats.td
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,10 @@ class RVInst64<dag outs, dag ins, string opcodestr, string argstr,

// Pseudo instructions
class Pseudo<dag outs, dag ins, list<dag> pattern, string opcodestr = "", string argstr = "">
: RVInst<outs, ins, opcodestr, argstr, pattern, InstFormatPseudo> {
: RVInstCommon<outs, ins, opcodestr, argstr, pattern, InstFormatPseudo> {
let isPseudo = 1;
let isCodeGenOnly = 1;
let Size = 4;
}

class PseudoQuietFCMP<DAGOperand Ty>
Expand Down
6 changes: 3 additions & 3 deletions llvm/lib/Target/RISCV/RISCVInstrInfoF.td
Original file line number Diff line number Diff line change
Expand Up @@ -503,13 +503,13 @@ def fpimm0 : PatLeaf<(fpimm), [{ return N->isExactlyValue(+0.0); }]>;

/// Generic pattern classes
class PatSetCC<DAGOperand Ty, SDPatternOperator OpNode, CondCode Cond,
RVInst Inst, ValueType vt>
RVInstCommon Inst, ValueType vt>
: Pat<(XLenVT (OpNode (vt Ty:$rs1), Ty:$rs2, Cond)), (Inst $rs1, $rs2)>;
multiclass PatSetCC_m<SDPatternOperator OpNode, CondCode Cond,
RVInst Inst, ExtInfo Ext> {
RVInstCommon Inst, ExtInfo Ext> {
let Predicates = Ext.Predicates in
def Ext.Suffix : PatSetCC<Ext.PrimaryTy, OpNode, Cond,
!cast<RVInst>(Inst#Ext.Suffix), Ext.PrimaryVT>;
!cast<RVInstCommon>(Inst#Ext.Suffix), Ext.PrimaryVT>;
}

class PatFprFpr<SDPatternOperator OpNode, RVInstR Inst,
Expand Down

0 comments on commit 03610af

Please sign in to comment.