diff options
author | Keith Randall <khr@golang.org> | 2015-08-12 14:51:24 -0700 |
---|---|---|
committer | Keith Randall <khr@golang.org> | 2015-08-12 22:27:15 +0000 |
commit | 867662da6ae5d8e29180c951b0184b241b780502 (patch) | |
tree | 0621d3ee666e5912d4e16402a2b57d7535014f9e /src/cmd/compile/internal/ssa/dom_test.go | |
parent | 514ab7c385116564d005c592e7473ba46c3fac87 (diff) | |
download | go-867662da6ae5d8e29180c951b0184b241b780502.tar.gz go-867662da6ae5d8e29180c951b0184b241b780502.zip |
[dev.ssa] cmd/compile: make sure entry block has no predecessors
Fix one test that build a violating CFG.
Change-Id: Ie0296ced602984d914a70461c76559c507ce2510
Reviewed-on: https://go-review.googlesource.com/13621
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/dom_test.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/dom_test.go | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/ssa/dom_test.go b/src/cmd/compile/internal/ssa/dom_test.go index 6cd2ff440c..e125907929 100644 --- a/src/cmd/compile/internal/ssa/dom_test.go +++ b/src/cmd/compile/internal/ssa/dom_test.go @@ -317,11 +317,13 @@ func TestDominatorsMultPredRev(t *testing.T) { c := testConfig(t) fun := Fun(c, "entry", Bloc("entry", + Goto("first")), + Bloc("first", Valu("mem", OpArg, TypeMem, 0, ".mem"), Valu("p", OpConstBool, TypeBool, 0, true), Goto("a")), Bloc("a", - If("p", "b", "entry")), + If("p", "b", "first")), Bloc("b", Goto("c")), Bloc("c", @@ -330,10 +332,11 @@ func TestDominatorsMultPredRev(t *testing.T) { Exit("mem"))) doms := map[string]string{ - "a": "entry", - "b": "a", - "c": "b", - "exit": "c", + "first": "entry", + "a": "first", + "b": "a", + "c": "b", + "exit": "c", } CheckFunc(fun.f) |