Skip to content

Commit

Permalink
BranchRelaxation: computeLiveIns() after creating new block
Browse files Browse the repository at this point in the history
One case in BranchRelaxation did not compute liveins after creating a
new block. This is catched by existing tests with an upcoming commit
that will improve MachineVerifier checking of livein lists.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@304049 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
MatzeB committed May 27, 2017
1 parent abfdee4 commit c6a4b1a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/CodeGen/BranchRelaxation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,10 @@ bool BranchRelaxation::fixupConditionalBranch(MachineInstr &MI) {
// Do it here since if there's no split, no update is needed.
MBB->replaceSuccessor(FBB, &NewBB);
NewBB.addSuccessor(FBB);

// Need to fix live-in lists if we track liveness.
if (TRI->trackLivenessAfterRegAlloc(*MF))
computeLiveIns(LiveRegs, MF->getRegInfo(), NewBB);
}

// We now have an appropriate fall-through block in place (either naturally or
Expand Down

0 comments on commit c6a4b1a

Please sign in to comment.