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) {
293
293
LIS->InsertMachineInstrInMaps (*SetExec);
294
294
LIS->InsertMachineInstrInMaps (*NewBr);
295
295
296
- LIS->removeAllRegUnitsForPhysReg (AMDGPU::EXEC);
297
296
MI.eraseFromParent ();
298
297
299
298
// FIXME: Is there a better way of adjusting the liveness? It shouldn't be
@@ -363,9 +362,6 @@ void SILowerControlFlow::emitElse(MachineInstr &MI) {
363
362
RecomputeRegs.insert (SrcReg);
364
363
RecomputeRegs.insert (DstReg);
365
364
LIS->createAndComputeVirtRegInterval (SaveReg);
366
-
367
- // Let this be recomputed.
368
- LIS->removeAllRegUnitsForPhysReg (AMDGPU::EXEC);
369
365
}
370
366
371
367
void SILowerControlFlow::emitIfBreak (MachineInstr &MI) {
@@ -828,7 +824,10 @@ bool SILowerControlFlow::run(MachineFunction &MF) {
828
824
829
825
optimizeEndCf ();
830
826
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);
832
831
for (Register Reg : RecomputeRegs) {
833
832
LIS->removeInterval (Reg);
834
833
LIS->createAndComputeVirtRegInterval (Reg);
You can’t perform that action at this time.
0 commit comments