Skip to content

Commit 28de0c5

Browse files
committed
[AVR] Add final jump to trueMBB
(avr-rust/rust-legacy-fork#46)
1 parent 3d2536f commit 28de0c5

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/Target/AVR/AVRISelLowering.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -1622,6 +1622,8 @@ AVRTargetLowering::EmitInstrWithCustomInserter(MachineInstr &MI,
16221622
// select.
16231623
trueMBB->splice(trueMBB->begin(), MBB,
16241624
std::next(MachineBasicBlock::iterator(MI)), MBB->end());
1625+
if (MBB->succ_begin() != MBB->succ_end())
1626+
BuildMI(trueMBB, dl, TII.get(AVR::RJMPk)).addMBB(*MBB->succ_begin());
16251627
trueMBB->transferSuccessorsAndUpdatePHIs(MBB);
16261628

16271629
AVRCC::CondCodes CC = (AVRCC::CondCodes)MI.getOperand(3).getImm();

0 commit comments

Comments
 (0)