File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -293,7 +293,6 @@ void SILowerControlFlow::emitIf(MachineInstr &MI) {
293293 LIS->InsertMachineInstrInMaps (*SetExec);
294294 LIS->InsertMachineInstrInMaps (*NewBr);
295295
296- LIS->removeAllRegUnitsForPhysReg (AMDGPU::EXEC);
297296 MI.eraseFromParent ();
298297
299298 // FIXME: Is there a better way of adjusting the liveness? It shouldn't be
@@ -363,9 +362,6 @@ void SILowerControlFlow::emitElse(MachineInstr &MI) {
363362 RecomputeRegs.insert (SrcReg);
364363 RecomputeRegs.insert (DstReg);
365364 LIS->createAndComputeVirtRegInterval (SaveReg);
366-
367- // Let this be recomputed.
368- LIS->removeAllRegUnitsForPhysReg (AMDGPU::EXEC);
369365}
370366
371367void SILowerControlFlow::emitIfBreak (MachineInstr &MI) {
@@ -828,7 +824,10 @@ bool SILowerControlFlow::run(MachineFunction &MF) {
828824
829825 optimizeEndCf ();
830826
831- if (LIS) {
827+ if (LIS && Changed) {
828+ // These will need to be recomputed for insertions and removals.
829+ LIS->removeAllRegUnitsForPhysReg (AMDGPU::EXEC);
830+ LIS->removeAllRegUnitsForPhysReg (AMDGPU::SCC);
832831 for (Register Reg : RecomputeRegs) {
833832 LIS->removeInterval (Reg);
834833 LIS->createAndComputeVirtRegInterval (Reg);
You can’t perform that action at this time.
0 commit comments