diff options
author | David Chase <drchase@google.com> | 2016-04-13 13:30:03 -0400 |
---|---|---|
committer | David Chase <drchase@google.com> | 2016-04-14 18:24:54 +0000 |
commit | 6b0b3f86d6b3c2cf01c7ed6080e038bda2c12997 (patch) | |
tree | 30eff410f8633133ae75f923d08db032f60815f1 /src/cmd/compile/internal/ssa/check.go | |
parent | 170c1b479bcd089eb8f76c8de6e5d44c6c4dbaa8 (diff) | |
download | go-6b0b3f86d6b3c2cf01c7ed6080e038bda2c12997.tar.gz go-6b0b3f86d6b3c2cf01c7ed6080e038bda2c12997.zip |
cmd/compile: fix use of original spill name after sinking
This is a fix for the ssacheck builder
http://build.golang.org/log/baa00f70c34e41186051cfe90568de3d91f115d7
after CL 21307 for sinking spills down loop exits
https://go-review.googlesource.com/#/c/21037/
The fix is to reuse (move) the original spill, thus preserving
the definition of the variable and its use count. Original and
copy both use the same stack slot, but ssacheck needs to see
a definition for the variable itself.
Fixes #15279.
Change-Id: I286285490193dc211b312d64dbc5a54867730bd6
Reviewed-on: https://go-review.googlesource.com/21995
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: David Chase <drchase@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/check.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/check.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/ssa/check.go b/src/cmd/compile/internal/ssa/check.go index 5a17735304..e4b8cb05f4 100644 --- a/src/cmd/compile/internal/ssa/check.go +++ b/src/cmd/compile/internal/ssa/check.go @@ -162,7 +162,7 @@ func checkFunc(f *Func) { // variable length args) nArgs := opcodeTable[v.Op].argLen if nArgs != -1 && int32(len(v.Args)) != nArgs { - f.Fatalf("value %v has %d args, expected %d", v.LongString(), + f.Fatalf("value %s has %d args, expected %d", v.LongString(), len(v.Args), nArgs) } @@ -207,15 +207,15 @@ func checkFunc(f *Func) { f.Fatalf("unknown aux type for %s", v.Op) } if !canHaveAux && v.Aux != nil { - f.Fatalf("value %v has an Aux value %v but shouldn't", v.LongString(), v.Aux) + f.Fatalf("value %s has an Aux value %v but shouldn't", v.LongString(), v.Aux) } if !canHaveAuxInt && v.AuxInt != 0 { - f.Fatalf("value %v has an AuxInt value %d but shouldn't", v.LongString(), v.AuxInt) + f.Fatalf("value %s has an AuxInt value %d but shouldn't", v.LongString(), v.AuxInt) } for _, arg := range v.Args { if arg == nil { - f.Fatalf("value %v has nil arg", v.LongString()) + f.Fatalf("value %s has nil arg", v.LongString()) } } @@ -271,7 +271,7 @@ func checkFunc(f *Func) { for _, v := range b.Values { for i, a := range v.Args { if !valueMark[a.ID] { - f.Fatalf("%v, arg %d of %v, is missing", a, i, v) + f.Fatalf("%v, arg %d of %s, is missing", a, i, v.LongString()) } } } |