]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: constant fold 128-bit multiplies
authorKeith Randall <khr@golang.org>
Mon, 21 Apr 2025 19:44:24 +0000 (12:44 -0700)
committerKeith Randall <khr@google.com>
Tue, 22 Apr 2025 17:24:18 +0000 (10:24 -0700)
commit7d0cb2a2adec493b8ad9d79ef35354c8e20f0213
tree9e4bd4a4999810643be45d905dec4553013b0184
parent7a177114df3e26f4362378e907a869c4fbbf38b7
cmd/compile: constant fold 128-bit multiplies

The full 64x64->128 multiply comes up when using bits.Mul64.
The 64x64->64+overflow multiply comes up in unsafe.Slice when using
a constant length.

Change-Id: I298515162ca07d804b2d699d03bc957ca30a4ebc
Reviewed-on: https://go-review.googlesource.com/c/go/+/667175
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Keith Randall <khr@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/ssa/_gen/generic.rules
src/cmd/compile/internal/ssa/rewrite.go
src/cmd/compile/internal/ssa/rewritegeneric.go
test/codegen/mathbits.go