Skip to content

Commit abff076

Browse files
committed
fixup! address review comment
1 parent f4778a3 commit abff076

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,9 @@ bool RISCVInstructionSelector::select(MachineInstr &MI) {
532532
if (!Dest.constrainAllUses(TII, TRI, RBI))
533533
return false;
534534

535+
// If the Kind is EK_LabelDifference32, the table stores an offset from
536+
// the location of the table. Add the table address to get an absolute
537+
// address.
535538
if (MJTI->getEntryKind() == MachineJumpTableInfo::EK_LabelDifference32) {
536539
Dest = MIB.buildInstr(RISCV::ADD, {&RISCV::GPRRegClass},
537540
{Dest.getReg(0), MI.getOperand(0)});

0 commit comments

Comments
 (0)