Skip to content

Commit be3cebd

Browse files
committed
fixup! Add comment
1 parent 06f4e7d commit be3cebd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/lib/Target/RISCV/RISCVTargetMachine.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,9 @@ void RISCVPassConfig::addPreEmitPass() {
570570
addPass(createMachineCopyPropagationPass(true));
571571
if (TM->getOptLevel() >= CodeGenOptLevel::Default)
572572
addPass(createRISCVLateBranchOptPass());
573+
// The IndirectBranchTrackingPass inserts lpad and could have changed the
574+
// basic block alignment. It must be done before Branch Relaxation to
575+
// prevent the adjusted offset exceeding the branch range.
573576
addPass(createRISCVIndirectBranchTrackingPass());
574577
addPass(&BranchRelaxationPassID);
575578
addPass(createRISCVMakeCompressibleOptPass());

0 commit comments

Comments
 (0)