This custom version is identical to CheckLoweredPhi. The addition of
CheckLoweredPhi likely raced with adding PPC64.
Change-Id: I294dcb758d312e93fb8842f4d1e12bf0f63a1e06
Reviewed-on: https://go-review.googlesource.com/28479
Run-TryBot: Michael Pratt <mpratt@google.com>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
gc.Gvarlive(n)
case ssa.OpPhi:
- // just check to make sure regalloc and stackalloc did it right
- if v.Type.IsMemory() {
- return
- }
- f := v.Block.Func
- loc := f.RegAlloc[v.ID]
- for _, a := range v.Args {
- if aloc := f.RegAlloc[a.ID]; aloc != loc { // TODO: .Equal() instead?
- 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)
- }
- }
+ gc.CheckLoweredPhi(v)
case ssa.OpPPC64LoweredNilCheck:
// Optimization - if the subsequent block has a load or store