From d7f7ea6ea894f197928cc728aef257c045e4e916 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandru=20Mo=C8=99oi?= Date: Wed, 30 Mar 2016 16:19:10 +0200 Subject: [PATCH] cmd/compile: ignore dead phis in fuse MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Happens occasionally for boolean phis was used as a control. Change-Id: Ie0f2483e9004c1706751d8dfb25ee2e5106d917e Reviewed-on: https://go-review.googlesource.com/21310 Run-TryBot: Alexandru Moșoi TryBot-Result: Gobot Gobot Reviewed-by: Keith Randall --- src/cmd/compile/internal/ssa/fuse.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cmd/compile/internal/ssa/fuse.go b/src/cmd/compile/internal/ssa/fuse.go index 1f826cd25e2..ce759cdec1d 100644 --- a/src/cmd/compile/internal/ssa/fuse.go +++ b/src/cmd/compile/internal/ssa/fuse.go @@ -65,7 +65,7 @@ func fuseBlockIf(b *Block) bool { b.Fatalf("invalid predecessors") } for _, v := range ss.Values { - if v.Op == OpPhi && v.Args[i0] != v.Args[i1] { + if v.Op == OpPhi && v.Uses > 0 && v.Args[i0] != v.Args[i1] { return false } }