aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/regalloc_test.go
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2016-04-22 13:09:18 -0700
committerKeith Randall <khr@golang.org>2016-04-23 16:30:27 +0000
commit9e3c68f1e02021a845c452ae347d06332e4ed79d (patch)
treea20c587275a2dc5c900a913d8aefc4a6e318d89c /src/cmd/compile/internal/ssa/regalloc_test.go
parent217c284995400bb761e5718782c8a90748c75aef (diff)
downloadgo-9e3c68f1e02021a845c452ae347d06332e4ed79d.tar.gz
go-9e3c68f1e02021a845c452ae347d06332e4ed79d.zip
cmd/compile: get rid of most byte and word insns for amd64
Now that we're using 32-bit ops for 8/16-bit logical operations (to avoid partial register stalls), there's really no need to keep track of the 8/16-bit ops at all. Convert everything we can to 32-bit ops. This CL is the obvious stuff. I might think a bit more about whether we can get rid of weirder stuff like HMULWU. The only downside to this CL is that we lose some information about constants. If we had source like: var a byte = ... a += 128 a += 128 We will convert that to a += 256, when we could get rid of the add altogether. This seems like a fairly unusual scenario and I'm happy with forgoing that optimization. Change-Id: Ia7c1e5203d0d110807da69ed646535194a3efba1 Reviewed-on: https://go-review.googlesource.com/22382 Reviewed-by: Todd Neal <todd@tneal.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/regalloc_test.go')
-rw-r--r--src/cmd/compile/internal/ssa/regalloc_test.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/ssa/regalloc_test.go b/src/cmd/compile/internal/ssa/regalloc_test.go
index 6f3f690f1e..cf8f452d12 100644
--- a/src/cmd/compile/internal/ssa/regalloc_test.go
+++ b/src/cmd/compile/internal/ssa/regalloc_test.go
@@ -11,8 +11,8 @@ func TestLiveControlOps(t *testing.T) {
f := Fun(c, "entry",
Bloc("entry",
Valu("mem", OpInitMem, TypeMem, 0, nil),
- Valu("x", OpAMD64MOVBconst, TypeInt8, 1, nil),
- Valu("y", OpAMD64MOVBconst, TypeInt8, 2, nil),
+ Valu("x", OpAMD64MOVLconst, TypeInt8, 1, nil),
+ Valu("y", OpAMD64MOVLconst, TypeInt8, 2, nil),
Valu("a", OpAMD64TESTB, TypeFlags, 0, nil, "x", "y"),
Valu("b", OpAMD64TESTB, TypeFlags, 0, nil, "y", "x"),
Eq("a", "if", "exit"),