]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: split DIVV/DIVVU op on loong64
authorWayne Zuo <wdvxdr@golangcn.org>
Thu, 2 Mar 2023 07:55:03 +0000 (15:55 +0800)
committerWayne Zuo <wdvxdr@golangcn.org>
Tue, 11 Apr 2023 01:59:02 +0000 (01:59 +0000)
commit96428e160de755d6b3b3b7dc1b9c81196957d679
treecaa2516ba5a23723d1ab59d13bb97eb22df0bb9c
parentdf6d442c389097de00586f9d43fe9f594ff5f49a
cmd/compile: split DIVV/DIVVU op on loong64

Previously, we need calculate both quotient and remainder together.
However, in most cases, only one result is needed. By separating these
instructions, we can save one instruction in most cases.

Change-Id: I0a2d4167cda68ab606783ba1aa2720ede19d6b53
Reviewed-on: https://go-review.googlesource.com/c/go/+/475315
Reviewed-by: Than McIntosh <thanm@google.com>
Run-TryBot: Wayne Zuo <wdvxdr@golangcn.org>
Reviewed-by: abner chenc <chenguoqi@loongson.cn>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/loong64/ssa.go
src/cmd/compile/internal/ssa/_gen/LOONG64.rules
src/cmd/compile/internal/ssa/_gen/LOONG64Ops.go
src/cmd/compile/internal/ssa/opGen.go
src/cmd/compile/internal/ssa/rewriteLOONG64.go