Commit 55845232 authored by Josh Bleecher Snyder's avatar Josh Bleecher Snyder

[dev.ssa] cmd/compile: improve error message for phi location mismatch

Change-Id: I402841743fcdc287631646039eb149f5cfdf886c
Reviewed-on: https://go-review.googlesource.com/13269Reviewed-by: 's avatarKeith Randall <khr@golang.org>
parent 6548b63d
...@@ -2111,8 +2111,8 @@ func genValue(v *ssa.Value) { ...@@ -2111,8 +2111,8 @@ func genValue(v *ssa.Value) {
f := v.Block.Func f := v.Block.Func
loc := f.RegAlloc[v.ID] loc := f.RegAlloc[v.ID]
for _, a := range v.Args { for _, a := range v.Args {
if f.RegAlloc[a.ID] != loc { // TODO: .Equal() instead? if aloc := f.RegAlloc[a.ID]; aloc != loc { // TODO: .Equal() instead?
v.Fatalf("phi arg at different location than phi %v %v %v %v", v, loc, a, f.RegAlloc[a.ID]) v.Fatalf("phi arg at different location than phi: %v @ %v, but arg %v @ %v\n%s\n", v, loc, a, aloc, v.Block.Func)
} }
} }
case ssa.OpConst8, ssa.OpConst16, ssa.OpConst32, ssa.OpConst64, ssa.OpConstString, ssa.OpConstNil, ssa.OpConstBool: case ssa.OpConst8, ssa.OpConst16, ssa.OpConst32, ssa.OpConst64, ssa.OpConstString, ssa.OpConstNil, ssa.OpConstBool:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment