Skip to content

Commit

Permalink
!fixup address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jaidTw committed Sep 20, 2024
1 parent 280efae commit fa2801c
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions llvm/lib/Target/RISCV/RISCVISelLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19750,21 +19750,17 @@ SDValue RISCVTargetLowering::LowerCall(CallLoweringInfo &CLI,

if (IsTailCall) {
MF.getFrameInfo().setHasTailCall();
SDValue Ret;
if (NeedSWGuarded)
Ret = DAG.getNode(RISCVISD::SW_GUARDED_TAIL, DL, NodeTys, Ops);
else
Ret = DAG.getNode(RISCVISD::TAIL, DL, NodeTys, Ops);
unsigned CallOpc =
NeedSWGuarded ? RISCVISD::SW_GUARDED_TAIL : RISCVISD::TAIL;
SDValue Ret = DAG.getNode(CallOpc, DL, NodeTys, Ops);
if (CLI.CFIType)
Ret.getNode()->setCFIType(CLI.CFIType->getZExtValue());
DAG.addNoMergeSiteInfo(Ret.getNode(), CLI.NoMerge);
return Ret;
}

if (NeedSWGuarded)
Chain = DAG.getNode(RISCVISD::SW_GUARDED_CALL, DL, NodeTys, Ops);
else
Chain = DAG.getNode(RISCVISD::CALL, DL, NodeTys, Ops);
unsigned CallOpc = NeedSWGuarded ? RISCVISD::SW_GUARDED_CALL : RISCVISD::CALL;
Chain = DAG.getNode(CallOpc, DL, NodeTys, Ops);
if (CLI.CFIType)
Chain.getNode()->setCFIType(CLI.CFIType->getZExtValue());
DAG.addNoMergeSiteInfo(Chain.getNode(), CLI.NoMerge);
Expand Down

0 comments on commit fa2801c

Please sign in to comment.