cmd/compile: remove deadcode

Change-Id: Iadf5c4e24440756a4267d2d27f0336c335b5d463
GitHub-Last-Rev: b42f3a5a88
GitHub-Pull-Request: golang/go#78938
Reviewed-on: https://go-review.googlesource.com/c/go/+/770460
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Keith Randall <khr@google.com>
Auto-Submit: Keith Randall <khr@golang.org>
This commit is contained in:
Weixie Cui 2026-04-25 07:17:22 +00:00 committed by Gopher Robot
parent d9a6e74180
commit bb1dde2709
2 changed files with 1 additions and 4 deletions

View file

@ -52,9 +52,6 @@ func maybeRewriteLoopToDownwardCountingLoop(f *Func, v indVar) {
}
start, end := v.min, v.max
if v.step < 0 {
start, end = end, start
}
if !start.isGenericIntConst() {
// if start is not a constant we would be winning nothing from inverting the loop

View file

@ -23,7 +23,7 @@ type indVar struct {
min *Value // minimum value, inclusive/exclusive depends on flags
max *Value // maximum value, inclusive/exclusive depends on flags
entry *Block // the block where the edge from the succeeded comparison of the induction variable goes to, means when the bound check has passed.
step int64
step int64 // it will always be positive.
flags indVarFlags
// Invariant: for all blocks dominated by entry:
// min <= ind < max [if flags == 0]