Fix indent/conditional removal in #108 that removed wrong brace. (#111)

In #108, we had removed a conditional that became constant-false with
the removal of pinned vregs. Unfortunately, in a pretty embarrassing
text-editing error, I removed the wrong end-brace and re-indented. This
had the effect of moving some of the move-resolution code around in the
regalloc backend, skipping moves in some cases and generating incorrect
results.

Caught as a fuzzbug by OSS-Fuzz in [0] (public after this merges and is
detected as fixed).

[0]: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=55391
This commit is contained in:
Chris Fallin
2023-01-25 13:20:26 -08:00
committed by GitHub
parent 0edb11d3a7
commit 376294e828

View File

@@ -364,6 +364,7 @@ impl<'a, F: Function> Env<'a, F> {
} }
block = block.next(); block = block.next();
}
// Scan over blocks whose beginnings are covered by // Scan over blocks whose beginnings are covered by
// this range and for which the vreg is live at the // this range and for which the vreg is live at the
@@ -459,7 +460,6 @@ impl<'a, F: Function> Env<'a, F> {
block = block.next(); block = block.next();
} }
}
// Scan over def/uses and apply allocations. // Scan over def/uses and apply allocations.
for use_idx in 0..self.ranges[entry.index.index()].uses.len() { for use_idx in 0..self.ranges[entry.index.index()].uses.len() {