Skip to content

Commit 3624491

Browse files
committed
Revert "[BranchRelaxation] Move faulting_op check into callee [nfc]"
This reverts commit c549da9. Per buildbots, this was not NFC.
1 parent d199bf9 commit 3624491

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

llvm/lib/CodeGen/BranchRelaxation.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -284,12 +284,6 @@ MachineBasicBlock *BranchRelaxation::splitBlockBeforeInstr(MachineInstr &MI,
284284
/// specific BB can fit in MI's displacement field.
285285
bool BranchRelaxation::isBlockInRange(
286286
const MachineInstr &MI, const MachineBasicBlock &DestBB) const {
287-
288-
// FAULTING_OP's destination is not encoded in the instruction stream
289-
// and thus always in range.
290-
if (MI.getOpcode() == TargetOpcode::FAULTING_OP)
291-
return true;
292-
293287
int64_t BrOffset = getInstrOffset(MI);
294288
int64_t DestOffset = BlockInfo[DestBB.getNumber()].Offset;
295289

@@ -564,6 +558,11 @@ bool BranchRelaxation::relaxBranchInstructions() {
564558
if (!MI.isConditionalBranch())
565559
continue;
566560

561+
if (MI.getOpcode() == TargetOpcode::FAULTING_OP)
562+
// FAULTING_OP's destination is not encoded in the instruction stream
563+
// and thus never needs relaxed.
564+
continue;
565+
567566
MachineBasicBlock *DestBB = TII->getBranchDestBlock(MI);
568567
if (!isBlockInRange(MI, *DestBB)) {
569568
if (Next != MBB.end() && Next->isConditionalBranch()) {

0 commit comments

Comments
 (0)