Skip to content

Commit 63c42b1

Browse files
committed
[RISCV][GISel] Remove what I think is an unnecessary insert point adjustment from RISCVCallLowering::lowerCall.
Other targets don't do this and no tests are affected by removing it.
1 parent 6c59f0e commit 63c42b1

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

llvm/lib/Target/RISCV/GISel/RISCVCallLowering.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -478,12 +478,6 @@ bool RISCVCallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
478478
SmallVector<ArgInfo, 4> SplitRetInfos;
479479
splitToValueTypes(Info.OrigRet, SplitRetInfos, DL, CC);
480480

481-
// Assignments should be handled *before* the merging of values takes place.
482-
// To ensure this, the insert point is temporarily adjusted to just after the
483-
// call instruction.
484-
MachineBasicBlock::iterator CallInsertPt = Call;
485-
MIRBuilder.setInsertPt(MIRBuilder.getMBB(), std::next(CallInsertPt));
486-
487481
RISCVIncomingValueAssigner RetAssigner(
488482
CC == CallingConv::Fast ? RISCV::CC_RISCV_FastCC : RISCV::CC_RISCV,
489483
/*IsRet=*/true);
@@ -492,8 +486,5 @@ bool RISCVCallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
492486
MIRBuilder, CC, Info.IsVarArg))
493487
return false;
494488

495-
// Readjust insert point to end of basic block.
496-
MIRBuilder.setMBB(MIRBuilder.getMBB());
497-
498489
return true;
499490
}

0 commit comments

Comments
 (0)