Skip to content

Commit 4a84c81

Browse files
committed
Remove more parts of the diff
1 parent 26a1a09 commit 4a84c81

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp

+6-4
Original file line numberDiff line numberDiff 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,14 @@ 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+
for (auto &MI : reverse(MBB)) {
13641366
if (!isCandidate(MI))
13651367
continue;
13661368
if (!tryReduceVL(MI))

0 commit comments

Comments
 (0)