1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

CodeGen: Fix livein calculation in MachineBasicBlock splitAt

Fix and simplify computation of liveins for new block.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D88535
This commit is contained in:
Carl Ritson 2020-10-02 09:58:36 +09:00
parent a538a3723b
commit 01c4226b07
2 changed files with 2 additions and 2 deletions

View File

@ -961,9 +961,10 @@ MachineBasicBlock *MachineBasicBlock::splitAt(MachineInstr &MI,
if (UpdateLiveIns) {
// Make sure we add any physregs we define in the block as liveins to the
// new block.
MachineBasicBlock::iterator Prev(&MI);
LiveRegs.init(*MF->getSubtarget().getRegisterInfo());
LiveRegs.addLiveOuts(*this);
for (auto I = rbegin(), E = SplitPoint.getReverse(); I != E; ++I)
for (auto I = rbegin(), E = Prev.getReverse(); I != E; ++I)
LiveRegs.stepBackward(*I);
}

View File

@ -233,7 +233,6 @@ body: |
; GCN: $exec = S_OR_B64_term $exec, [[COPY3]], implicit-def $scc
; GCN: bb.3:
; GCN: successors: %bb.2(0x80000000)
; GCN: liveins: $vgpr3
; GCN: $vgpr3 = V_MOV_B32_e32 0, implicit $exec
; GCN: $sgpr4_sgpr5 = S_MOV_B64 32
; GCN: bb.2: