File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1353,7 +1353,6 @@ bool RISCVVLOptimizer::runOnMachineFunction(MachineFunction &MF) {
13531353 // For each instruction that defines a vector, compute what VL its
13541354 // downstream users demand.
13551355 for (MachineBasicBlock *MBB : post_order (&MF)) {
1356- // Avoid unreachable blocks as they have degenerate dominance
13571356 assert (MDT->isReachableFromEntry (MBB));
13581357 for (MachineInstr &MI : reverse (*MBB)) {
13591358 if (!isCandidate (MI))
@@ -1363,11 +1362,15 @@ bool RISCVVLOptimizer::runOnMachineFunction(MachineFunction &MF) {
13631362 }
13641363 }
13651364
1365+ // Then go through and see if we can reduce the VL of any instructions to
1366+ // only what's demanded.
13661367 bool MadeChange = false ;
13671368 for (MachineBasicBlock &MBB : MF) {
1368- // Then go through and see if we can reduce the VL of any instructions to
1369- // only what's demanded.
1370- for (auto &MI : MBB) {
1369+ // Avoid unreachable blocks as they have degenerate dominance
1370+ if (!MDT->isReachableFromEntry (&MBB))
1371+ continue ;
1372+
1373+ for (auto &MI : reverse (MBB)) {
13711374 if (!isCandidate (MI))
13721375 continue ;
13731376 if (!tryReduceVL (MI))
You can’t perform that action at this time.
0 commit comments