]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ssagen: improve intrinsic architecture handling
authorJoel Sing <joel@sing.id.au>
Sun, 4 Aug 2024 04:19:57 +0000 (14:19 +1000)
committerJoel Sing <joel@sing.id.au>
Tue, 20 Aug 2024 13:39:19 +0000 (13:39 +0000)
commitb6f05cc3335d8a3058a7892835b10d82fad31046
treec40058c865c669593e3a867ef913097f83989194
parentd49d0e0d3ac91a27f1936798335d67df9d7c0b35
cmd/compile/internal/ssagen: improve intrinsic architecture handling

The architecture handling code for intrinsics is more complex than
it needs to be. sys.Archs is already an array of *sys.Arch and the
existing InFamily function can be used instead of a reimplementation.

Add some test coverage for sys.Arch.InFamily while here.

Change-Id: Ia764f211114fea65424c09a421c5ccb02b7187b0
Reviewed-on: https://go-review.googlesource.com/c/go/+/605476
Reviewed-by: Carlos Amedee <carlos@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/cmd/compile/internal/ssagen/ssa.go
src/cmd/internal/sys/arch_test.go [new file with mode: 0644]