1
0
mirror of https://github.com/golang/go synced 2024-11-18 04:04:49 -07:00

cmd/compile: use CheckLoweredPhi on PPC64

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>
This commit is contained in:
Michael Pratt 2016-09-03 18:32:51 -07:00 committed by Josh Bleecher Snyder
parent 3a67d595f5
commit 4c8baa0ad0

View File

@ -854,17 +854,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
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