From cd9457c380b92528a38184e322a464e9cc312945 Mon Sep 17 00:00:00 2001 From: Lucas Steuernagel <38472950+LucasSte@users.noreply.github.com> Date: Fri, 19 Jan 2024 09:56:20 -0300 Subject: [PATCH] [SOL] Fix Predicate naming convention (#82) * Fix out of pattern name * Remove deprecated function --- llvm/lib/Target/SBF/SBFISelLowering.cpp | 2 +- llvm/lib/Target/SBF/SBFInstrInfo.td | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/llvm/lib/Target/SBF/SBFISelLowering.cpp b/llvm/lib/Target/SBF/SBFISelLowering.cpp index 32420b735469d8..fc415d6231a115 100644 --- a/llvm/lib/Target/SBF/SBFISelLowering.cpp +++ b/llvm/lib/Target/SBF/SBFISelLowering.cpp @@ -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"); diff --git a/llvm/lib/Target/SBF/SBFInstrInfo.td b/llvm/lib/Target/SBF/SBFInstrInfo.td index 95ce0ec412c035..3ccb1a3587b680 100644 --- a/llvm/lib/Target/SBF/SBFInstrInfo.td +++ b/llvm/lib/Target/SBF/SBFInstrInfo.td @@ -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()">; @@ -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]>; } @@ -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