File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -794,9 +794,9 @@ bool MachineSinking::runOnMachineFunction(MachineFunction &MF) {
794
794
795
795
enum CycleSinkStage { COPY, LOW_LATENCY, AGGRESSIVE, END };
796
796
for (unsigned Stage = CycleSinkStage::COPY; Stage != CycleSinkStage::END;
797
- ++Stage) {
797
+ ++Stage, SunkInstrs. clear () ) {
798
798
HasHighPressure = false ;
799
- SunkInstrs. clear ();
799
+
800
800
for (auto *Cycle : Cycles) {
801
801
MachineBasicBlock *Preheader = Cycle->getCyclePreheader ();
802
802
if (!Preheader) {
@@ -1757,8 +1757,8 @@ bool MachineSinking::aggressivelySinkIntoCycle(
1757
1757
1758
1758
// Conservatively clear any kill flags on uses of sunk instruction
1759
1759
for (MachineOperand &MO : NewMI->all_uses ()) {
1760
- if (MO.isReg ())
1761
- RegsToClearKillFlags.insert (MO.getReg ());
1760
+ assert (MO.isReg () && MO. isUse ());
1761
+ RegsToClearKillFlags.insert (MO.getReg ());
1762
1762
}
1763
1763
1764
1764
// The instruction is moved from its basic block, so do not retain the
You can’t perform that action at this time.
0 commit comments