]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: simplify intrinsification of TrailingZeros16 and TrailingZeros8
authorJoel Sing <joel@sing.id.au>
Sat, 22 Feb 2025 12:26:21 +0000 (23:26 +1100)
committerJoel Sing <joel@sing.id.au>
Thu, 27 Feb 2025 11:45:44 +0000 (03:45 -0800)
commit927fdb7843ce96b42791912b42d0d3e6735e8dde
tree27ebbc2cf16f07ccb33f555d31327ce758e5bf4d
parent01ba8bfe868df2eea10ea8dd5bfbe5af0549909d
cmd/compile: simplify intrinsification of TrailingZeros16 and TrailingZeros8

Decompose Ctz16 and Ctz8 within the SSA rules for LOONG64, MIPS, PPC64
and S390X, rather than having a custom intrinsic. Note that for PPC64 this
actually allows the existing Ctz16 and Ctz8 rules to be used.

Change-Id: I27a5e978f852b9d75396d2a80f5d7dfcb5ef7dd4
Reviewed-on: https://go-review.googlesource.com/c/go/+/651816
Reviewed-by: Paul Murphy <murp@ibm.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
src/cmd/compile/internal/ssa/_gen/LOONG64.rules
src/cmd/compile/internal/ssa/_gen/MIPS.rules
src/cmd/compile/internal/ssa/_gen/PPC64.rules
src/cmd/compile/internal/ssa/_gen/S390X.rules
src/cmd/compile/internal/ssa/rewriteLOONG64.go
src/cmd/compile/internal/ssa/rewriteMIPS.go
src/cmd/compile/internal/ssa/rewritePPC64.go
src/cmd/compile/internal/ssa/rewriteS390X.go
src/cmd/compile/internal/ssagen/intrinsics.go
src/cmd/compile/internal/ssagen/intrinsics_test.go
test/codegen/mathbits.go