Skip to content

Commit 1b55379

Browse files
committed
Small fixes
1 parent 1618341 commit 1b55379

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,8 @@ void RISCVAsmPrinter::LowerPATCHPOINT(MCStreamer &OutStreamer, StackMaps &SM,
164164
// Materialize the jump address:
165165
SmallVector<MCInst, 8> Seq;
166166
RISCVMatInt::generateMCInstSeq(CallTarget, *STI, RISCV::X1, Seq);
167-
for (MCInst &Inst : Seq) {
167+
for (MCInst &Inst : Seq)
168168
EmitToStreamer(OutStreamer, Inst);
169-
}
170169
EncodedBytes += Seq.size() * 4;
171170
EmitToStreamer(OutStreamer, MCInstBuilder(RISCV::JALR)
172171
.addReg(RISCV::X1)

llvm/lib/Target/RISCV/RISCVInstrInfo.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,9 +1527,7 @@ unsigned RISCVInstrInfo::getInstSizeInBytes(const MachineInstr &MI) const {
15271527
// The size of the statepoint intrinsic is the number of bytes requested
15281528
unsigned NumBytes = StatepointOpers(&MI).getNumPatchBytes();
15291529
// A statepoint is at least a PseudoCALL
1530-
if (NumBytes < 8)
1531-
NumBytes = 8;
1532-
return NumBytes;
1530+
return std::max(NumBytes, 8U);
15331531
}
15341532
default:
15351533
return get(Opcode).getSize();

0 commit comments

Comments
 (0)