Skip to content

Commit

Permalink
[AMDGPU] Add exec copy to LiveIntervals in SILowerControlFlow::emitElse
Browse files Browse the repository at this point in the history
This instruction is missing from LiveIntervals.
I'm not aware of any problems because of this though.

Differential Revision: https://reviews.llvm.org/D28879

llvm-svn: 292521
  • Loading branch information
rampitec committed Jan 19, 2017
1 parent a44ebf4 commit 6825770
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp
Expand Up @@ -219,7 +219,8 @@ void SILowerControlFlow::emitElse(MachineInstr &MI) {
// tied. In order to correctly tie the registers, split this into a copy of
// the src like it does.
unsigned CopyReg = MRI->createVirtualRegister(&AMDGPU::SReg_64RegClass);
BuildMI(MBB, Start, DL, TII->get(AMDGPU::COPY), CopyReg)
MachineInstr *CopyExec =
BuildMI(MBB, Start, DL, TII->get(AMDGPU::COPY), CopyReg)
.add(MI.getOperand(1)); // Saved EXEC

// This must be inserted before phis and any spill code inserted before the
Expand Down Expand Up @@ -261,6 +262,7 @@ void SILowerControlFlow::emitElse(MachineInstr &MI) {
LIS->RemoveMachineInstrFromMaps(MI);
MI.eraseFromParent();

LIS->InsertMachineInstrInMaps(*CopyExec);
LIS->InsertMachineInstrInMaps(*OrSaveExec);

LIS->InsertMachineInstrInMaps(*Xor);
Expand Down

0 comments on commit 6825770

Please sign in to comment.