opt niche known-zero loop
This commit is contained in:
parent
6d18d0b0b3
commit
c50318a67a
|
@ -89,7 +89,12 @@ fn purge_comments(ops: &mut [Op]) -> bool {
|
|||
for i in 0..ops.len() - 1 {
|
||||
use Op::*;
|
||||
if let [Set(0), LoopStart(x)] = ops[i..i + 2] {
|
||||
dbg!(i);
|
||||
for j in i + 1..=x {
|
||||
ops[j] = Nop;
|
||||
acted = true;
|
||||
}
|
||||
}
|
||||
if let [LoopEnd(..), LoopStart(x)] = ops[i..i + 2] {
|
||||
for j in i + 1..=x {
|
||||
ops[j] = Nop;
|
||||
acted = true;
|
||||
|
|
Loading…
Reference in New Issue