-
- Downloads
cmd/compile/internal/ssa: emit IMUL3{L/Q} for MUL{L/Q}const on x86
cmd/asm now supports three-operand form of IMUL, so instead of using IMUL with resultInArg0, emit IMUL3 instruction. This results in less redundant MOVs where SSA assigns different registers to input[0] and dst arguments. Note: these have exactly the same encoding when reg0=reg1: IMUL3x $const, reg0, reg1 IMULx $const, reg Two-operand IMULx is like a crippled IMUL3x, with dst fixed to input[0]. This is why we don't bother to generate IMULx for the case where dst is the same as input[0]. Change-Id: I4becda475b3dffdd07b6fdf1c75bacc82af654e4 Reviewed-on: https://go-review.googlesource.com/99656 Run-TryBot: Iskander Sharipov <iskander.sharipov@intel.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by:Giovanni Bajo <rasky@develer.com> Reviewed-by:
Keith Randall <khr@golang.org>
Showing
- src/cmd/compile/internal/amd64/ssa.go 1 addition, 8 deletionssrc/cmd/compile/internal/amd64/ssa.go
- src/cmd/compile/internal/ssa/gen/386Ops.go 1 addition, 1 deletionsrc/cmd/compile/internal/ssa/gen/386Ops.go
- src/cmd/compile/internal/ssa/gen/AMD64Ops.go 2 additions, 2 deletionssrc/cmd/compile/internal/ssa/gen/AMD64Ops.go
- src/cmd/compile/internal/ssa/opGen.go 3 additions, 6 deletionssrc/cmd/compile/internal/ssa/opGen.go
- src/cmd/compile/internal/x86/ssa.go 1 addition, 8 deletionssrc/cmd/compile/internal/x86/ssa.go
- test/codegen/arithmetic.go 6 additions, 6 deletionstest/codegen/arithmetic.go
Loading
Please register or sign in to comment