]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile: use CheckLoweredPhi on PPC64
authorMichael Pratt <mpratt@google.com>
Sun, 4 Sep 2016 01:32:51 +0000 (18:32 -0700)
committerJosh Bleecher Snyder <josharian@gmail.com>
Sun, 4 Sep 2016 01:55:43 +0000 (01:55 +0000)
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>

src/cmd/compile/internal/ppc64/ssa.go

index 1d81d39b303d98840724597f2ef810b3225bad2c..78047269d34a462c46afb719c3b6cb3b9dc33b8d 100644 (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