aboutsummaryrefslogtreecommitdiff
path: root/test/codegen/arithmetic.go
diff options
context:
space:
mode:
authorXiaolin Zhao <zhaoxiaolin@loongson.cn>2025-11-18 13:00:15 +0800
committerabner chenc <chenguoqi@loongson.cn>2025-11-23 23:54:44 -0800
commitfeae743bdbb7dc4b9d053117dbea494202d6a2de (patch)
tree34a307673976c30b1495e0413c905c2933c91126 /test/codegen/arithmetic.go
parente88be8a128d167c5ab91eabc998ab364370c702e (diff)
downloadgo-feae743bdbb7dc4b9d053117dbea494202d6a2de.tar.xz
cmd/compile: use 32x32->64 multiplies on loong64
Gets rid of some sign extensions, like arm64. Change-Id: I9fc37e15a82718bfcf53db8cab0c4e7baaa0a747 Reviewed-on: https://go-review.googlesource.com/c/go/+/721522 Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@golang.org> Reviewed-by: Meidan Li <limeidan@loongson.cn> Reviewed-by: Mark Freeman <markfreeman@google.com> Reviewed-by: abner chenc <chenguoqi@loongson.cn> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'test/codegen/arithmetic.go')
-rw-r--r--test/codegen/arithmetic.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/codegen/arithmetic.go b/test/codegen/arithmetic.go
index 29764bf817..7cc6cf77e1 100644
--- a/test/codegen/arithmetic.go
+++ b/test/codegen/arithmetic.go
@@ -335,11 +335,13 @@ func Fold2NegMul(a, b int) int {
func Mul32(a, b int32) int64 {
// arm64:"SMULL" -"MOVW"
+ // loong64:"MULWVW" -"MOVW"
return int64(a) * int64(b)
}
func Mul32U(a, b uint32) uint64 {
// arm64:"UMULL" -"MOVWU"
+ // loong64:"MULWVWU" -"MOVWU"
return uint64(a) * uint64(b)
}