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 @@ -1346,7 +1346,6 @@ bool RISCVVLOptimizer::runOnMachineFunction(MachineFunction &MF) {
13461346 // For each instruction that defines a vector, compute what VL its
13471347 // downstream users demand.
13481348 for (MachineBasicBlock *MBB : post_order (&MF)) {
1349- // Avoid unreachable blocks as they have degenerate dominance
13501349 assert (MDT->isReachableFromEntry (MBB));
13511350 for (MachineInstr &MI : reverse (*MBB)) {
13521351 if (!isCandidate (MI))
@@ -1356,11 +1355,15 @@ bool RISCVVLOptimizer::runOnMachineFunction(MachineFunction &MF) {
13561355 }
13571356 }
13581357
1358+ // Then go through and see if we can reduce the VL of any instructions to
1359+ // only what's demanded.
13591360 bool MadeChange = false ;
13601361 for (MachineBasicBlock &MBB : MF) {
1361- // Then go through and see if we can reduce the VL of any instructions to
1362- // only what's demanded.
1363- for (auto &MI : MBB) {
1362+ // Avoid unreachable blocks as they have degenerate dominance
1363+ if (!MDT->isReachableFromEntry (&MBB))
1364+ continue ;
1365+
1366+ for (auto &MI : reverse (MBB)) {
13641367 if (!isCandidate (MI))
13651368 continue ;
13661369 if (!tryReduceVL (MI))
You can’t perform that action at this time.
0 commit comments