File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1527,13 +1527,18 @@ bool SIWholeQuadMode::lowerCopyInstrs() {
1527
1527
for (MachineInstr *MI : LowerToCopyInstrs) {
1528
1528
LLVM_DEBUG (dbgs () << " simplify: " << *MI);
1529
1529
1530
- Register RecomputeReg = 0 ;
1531
1530
if (MI->getOpcode () == AMDGPU::V_SET_INACTIVE_B32 ||
1532
1531
MI->getOpcode () == AMDGPU::V_SET_INACTIVE_B64) {
1533
1532
assert (MI->getNumExplicitOperands () == 3 );
1533
+
1534
+ LiveInterval *RecomputeLI = nullptr ;
1534
1535
if (MI->getOperand (2 ).isReg ())
1535
- RecomputeReg = MI->getOperand (2 ).getReg ();
1536
+ RecomputeLI = &LIS->getInterval (MI->getOperand (2 ).getReg ());
1537
+
1536
1538
MI->removeOperand (2 );
1539
+
1540
+ if (RecomputeLI)
1541
+ LIS->shrinkToUses (RecomputeLI);
1537
1542
} else {
1538
1543
assert (MI->getNumExplicitOperands () == 2 );
1539
1544
}
@@ -1550,11 +1555,6 @@ bool SIWholeQuadMode::lowerCopyInstrs() {
1550
1555
1551
1556
MI->setDesc (TII->get (CopyOp));
1552
1557
LLVM_DEBUG (dbgs () << " -> " << *MI);
1553
-
1554
- if (RecomputeReg) {
1555
- LIS->removeInterval (RecomputeReg);
1556
- LIS->createAndComputeVirtRegInterval (RecomputeReg);
1557
- }
1558
1558
}
1559
1559
return !LowerToCopyInstrs.empty () || !LowerToMovInstrs.empty ();
1560
1560
}
You can’t perform that action at this time.
0 commit comments