From dc5a7682f0ec9cc344fcdb61d67b9d37c6ad3cc6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexandru=20Mo=C8=99oi?= Date: Wed, 30 Mar 2016 18:17:45 +0200 Subject: [PATCH] cmd/compile: use inc/dec for bytes, too MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ib2890ab1983cbef7c1c1ee5a10204ba3ace19b53 Reviewed-on: https://go-review.googlesource.com/21312 Run-TryBot: Alexandru Moșoi TryBot-Result: Gobot Gobot Reviewed-by: Keith Randall --- src/cmd/compile/internal/amd64/ssa.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/cmd/compile/internal/amd64/ssa.go b/src/cmd/compile/internal/amd64/ssa.go index df3be248d22..0ff2e88f0ac 100644 --- a/src/cmd/compile/internal/amd64/ssa.go +++ b/src/cmd/compile/internal/amd64/ssa.go @@ -430,9 +430,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { // and make a binary a little smaller. case ssa.OpAMD64ADDQconst: asm = x86.AINCQ - case ssa.OpAMD64ADDLconst: - asm = x86.AINCL - case ssa.OpAMD64ADDWconst: + case ssa.OpAMD64ADDLconst, ssa.OpAMD64ADDWconst, ssa.OpAMD64ADDBconst: asm = x86.AINCL } p := gc.Prog(asm) @@ -444,9 +442,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) { switch v.Op { case ssa.OpAMD64ADDQconst: asm = x86.ADECQ - case ssa.OpAMD64ADDLconst: - asm = x86.ADECL - case ssa.OpAMD64ADDWconst: + case ssa.OpAMD64ADDLconst, ssa.OpAMD64ADDWconst, ssa.OpAMD64ADDBconst: asm = x86.ADECL } p := gc.Prog(asm)