Skip to content

Commit

Permalink
[SOL] Fix Predicate naming convention (llvm#82)
Browse files Browse the repository at this point in the history
* Fix out of pattern name

* Remove deprecated function
  • Loading branch information
LucasSte committed Aug 19, 2024
1 parent f97cc35 commit cd9457c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion llvm/lib/Target/SBF/SBFISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -471,7 +471,7 @@ SDValue SBFTargetLowering::LowerFormalArguments(
SDValue Const = DAG.getConstant(SBFRegisterInfo::FrameLength - VA.getLocMemOffset(), DL, MVT::i64);
SDValue SDV = DAG.getCopyFromReg(Chain, DL, reg, getPointerTy(MF.getDataLayout()));
SDV = DAG.getNode(ISD::SUB, DL, PtrVT, SDV, Const);
SDV = DAG.getLoad(LocVT, DL, Chain, SDV, MachinePointerInfo(), 0);
SDV = DAG.getLoad(LocVT, DL, Chain, SDV, MachinePointerInfo());
InVals.push_back(SDV);
} else {
fail(DL, DAG, "defined with too many args");
Expand Down
6 changes: 3 additions & 3 deletions llvm/lib/Target/SBF/SBFInstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def SBFNoNeg: Predicate<"Subtarget->getDisableNeg()">;
def SBFRevSub : Predicate<"Subtarget->getReverseSubImm()">;
def SBFNoRevSub : Predicate<"!Subtarget->getReverseSubImm()">;
def SBFCallxSrc : Predicate<"Subtarget->getCallXRegSrc()">, AssemblerPredicate<(all_of FeatureCallxRegSrc)>;
def NoSBFCallxSrc : Predicate<"!Subtarget->getCallXRegSrc()">;
def SBFNoCallxSrc : Predicate<"!Subtarget->getCallXRegSrc()">;
def SBFPqrInstr : Predicate<"Subtarget->getHasPqrClass()">;
def SBFNoPqrInstr : Predicate<"!Subtarget->getHasPqrClass()">;

Expand Down Expand Up @@ -583,7 +583,7 @@ let isCall=1, hasDelaySlot=0, Uses = [R11],
// Potentially clobbered registers
Defs = [R0, R1, R2, R3, R4, R5] in {
def JAL : CALL<"call">;
def JALX : CALLX<"callx">, Requires<[NoSBFCallxSrc]>;
def JALX : CALLX<"callx">, Requires<[SBFNoCallxSrc]>;
let DecoderNamespace = "SBFv2" in {
def JALX_v2 : CALLX_SRC_REG<"callx">, Requires<[SBFCallxSrc]>;
}
Expand Down Expand Up @@ -680,7 +680,7 @@ def : Pat<(i64 (and (i64 GPR:$src), 0xffffFFFF)),
def : Pat<(SBFcall tglobaladdr:$dst), (JAL tglobaladdr:$dst)>;
def : Pat<(SBFcall texternalsym:$dst), (JAL texternalsym:$dst)>;
def : Pat<(SBFcall imm:$dst), (JAL imm:$dst)>;
def : Pat<(SBFcall GPR:$dst), (JALX GPR:$dst)>, Requires<[NoSBFCallxSrc]>;
def : Pat<(SBFcall GPR:$dst), (JALX GPR:$dst)>, Requires<[SBFNoCallxSrc]>;
def : Pat<(SBFcall GPR:$dst), (JALX_v2 GPR:$dst)>, Requires<[SBFCallxSrc]>;

// Loads
Expand Down

0 comments on commit cd9457c

Please sign in to comment.