mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
[dev.ssa] cmd/compile/internal/ssa: Split OpConst into an OpConst8, OpConst16, ...
Convert the polymorphic OpConst into monomorphic variants. Change-Id: I90bb8894fbac04ca5e5484ea260c131ef8b506fb Reviewed-on: https://go-review.googlesource.com/12798 Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
This commit is contained in:
parent
25d1916816
commit
9cb332efd4
16 changed files with 546 additions and 313 deletions
|
|
@ -17,7 +17,7 @@ func TestDeadLoop(t *testing.T) {
|
|||
// dead loop
|
||||
Bloc("deadblock",
|
||||
// dead value in dead block
|
||||
Valu("deadval", OpConst, TypeBool, 0, true),
|
||||
Valu("deadval", OpConstBool, TypeBool, 0, true),
|
||||
If("deadval", "deadblock", "exit")))
|
||||
|
||||
CheckFunc(fun.f)
|
||||
|
|
@ -41,7 +41,7 @@ func TestDeadValue(t *testing.T) {
|
|||
fun := Fun(c, "entry",
|
||||
Bloc("entry",
|
||||
Valu("mem", OpArg, TypeMem, 0, ".mem"),
|
||||
Valu("deadval", OpConst, TypeInt64, 37, nil),
|
||||
Valu("deadval", OpConst64, TypeInt64, 37, nil),
|
||||
Goto("exit")),
|
||||
Bloc("exit",
|
||||
Exit("mem")))
|
||||
|
|
@ -63,7 +63,7 @@ func TestNeverTaken(t *testing.T) {
|
|||
c := NewConfig("amd64", DummyFrontend{t})
|
||||
fun := Fun(c, "entry",
|
||||
Bloc("entry",
|
||||
Valu("cond", OpConst, TypeBool, 0, false),
|
||||
Valu("cond", OpConstBool, TypeBool, 0, false),
|
||||
Valu("mem", OpArg, TypeMem, 0, ".mem"),
|
||||
If("cond", "then", "else")),
|
||||
Bloc("then",
|
||||
|
|
@ -99,7 +99,7 @@ func TestNestedDeadBlocks(t *testing.T) {
|
|||
fun := Fun(c, "entry",
|
||||
Bloc("entry",
|
||||
Valu("mem", OpArg, TypeMem, 0, ".mem"),
|
||||
Valu("cond", OpConst, TypeBool, 0, false),
|
||||
Valu("cond", OpConstBool, TypeBool, 0, false),
|
||||
If("cond", "b2", "b4")),
|
||||
Bloc("b2",
|
||||
If("cond", "b3", "b4")),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue