diff options
author | Matthias Braun <matze@braunis.de> | 2017-05-27 00:53:48 +0000 |
---|---|---|
committer | Matthias Braun <matze@braunis.de> | 2017-05-27 00:53:48 +0000 |
commit | 24dc63a9b9a581a31dfa8912dbcc18735c75bba1 (patch) | |
tree | 12d802dc0a1145925930b21689ab916aef3527e4 /llvm/lib/CodeGen/BranchRelaxation.cpp | |
parent | b4f74224ff19b4f738a83e4ac3cfbfe35c3ea2fc (diff) | |
download | bcm5719-llvm-24dc63a9b9a581a31dfa8912dbcc18735c75bba1.tar.gz bcm5719-llvm-24dc63a9b9a581a31dfa8912dbcc18735c75bba1.zip |
BranchRelaxation: computeLiveIns() after creating new block
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.
llvm-svn: 304049
Diffstat (limited to 'llvm/lib/CodeGen/BranchRelaxation.cpp')
-rw-r--r-- | llvm/lib/CodeGen/BranchRelaxation.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/BranchRelaxation.cpp b/llvm/lib/CodeGen/BranchRelaxation.cpp index feaabb44c07..e3de61c7816 100644 --- a/llvm/lib/CodeGen/BranchRelaxation.cpp +++ b/llvm/lib/CodeGen/BranchRelaxation.cpp @@ -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 |