From: cui Date: Mon, 5 Apr 2021 12:38:12 +0000 (+0000) Subject: cmd/compile/internal/ssagen: conditon not need X-Git-Tag: go1.17beta1~843 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=9abedf4827;p=gostls13.git cmd/compile/internal/ssagen: conditon not need n.Op() == ir.OFOR so n.Op() != ir.OFORUNTIL is always true Change-Id: I97191783c1fb31ef76e0601f626b45af1e8d316e GitHub-Last-Rev: f68f9fecfb7adf37af060afb77d6615839aabc6e GitHub-Pull-Request: golang/go#45389 Reviewed-on: https://go-review.googlesource.com/c/go/+/307251 Reviewed-by: Keith Randall Run-TryBot: Keith Randall TryBot-Result: Go Bot Trust: Josh Bleecher Snyder --- diff --git a/src/cmd/compile/internal/ssagen/ssa.go b/src/cmd/compile/internal/ssagen/ssa.go index 0a49ca214d..8275d2ec9c 100644 --- a/src/cmd/compile/internal/ssagen/ssa.go +++ b/src/cmd/compile/internal/ssagen/ssa.go @@ -1803,7 +1803,7 @@ func (s *state) stmt(n ir.Node) { b.AddEdgeTo(bCond) // It can happen that bIncr ends in a block containing only VARKILL, // and that muddles the debugging experience. - if n.Op() != ir.OFORUNTIL && b.Pos == src.NoXPos { + if b.Pos == src.NoXPos { b.Pos = bCond.Pos } }