cmd/compile/internal/ssa: fix verb typos

This commit is contained in:
Marcel Meyer 2025-04-11 20:22:50 +02:00
parent c77ada1b78
commit 21a00e030f
No known key found for this signature in database

View file

@ -1299,8 +1299,8 @@ func prove(f *Func) {
} }
// try to rewrite to a downward counting loop checking against start if the // try to rewrite to a downward counting loop checking against start if the
// loop body does not depends on ind or nxt and end is known before the loop. // loop body does not depend on ind or nxt and end is known before the loop.
// This reduce pressure on the register allocator because this do not need // This reduces pressure on the register allocator because this does not need
// to use end on each iteration anymore. We compare against the start constant instead. // to use end on each iteration anymore. We compare against the start constant instead.
// That means this code: // That means this code:
// //
@ -1332,7 +1332,7 @@ func prove(f *Func) {
// //
// exit_loop: // exit_loop:
// //
// this is better because it only require to keep ind then nxt alive while looping, // this is better because it only requires to keep ind then nxt alive while looping,
// while the original form keeps ind then nxt and end alive // while the original form keeps ind then nxt and end alive
start, end := v.min, v.max start, end := v.min, v.max
if v.flags&indVarCountDown != 0 { if v.flags&indVarCountDown != 0 {
@ -1355,7 +1355,7 @@ func prove(f *Func) {
if end.Block == ind.Block { if end.Block == ind.Block {
// we can't rewrite loops where the condition depends on the loop body // we can't rewrite loops where the condition depends on the loop body
// this simple check is forced to work because if this is true a Phi in ind.Block must exists // this simple check is forced to work because if this is true a Phi in ind.Block must exist
continue continue
} }