Skip to content

Commit 376fe4d

Browse files
committed
Remove more parts of the diff
1 parent 1a5deaa commit 376fe4d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff 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))

0 commit comments

Comments
 (0)