]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ssa: simplify riscv64 FCLASSD rewrite rules
authorMichael Munday <mndygolang+git@gmail.com>
Mon, 3 Nov 2025 23:05:25 +0000 (23:05 +0000)
committerGopher Robot <gobot@golang.org>
Tue, 4 Nov 2025 20:47:42 +0000 (12:47 -0800)
commita7d174ccaada72b836c1c535f056d3fff5b2d528
tree8e03d770a8d25e75002b936adc4471e4c8d57c17
parent856238615deb2158f3868e7475817b3a2d6b2513
cmd/compile/internal/ssa: simplify riscv64 FCLASSD rewrite rules

We don't need to check that the bit patterns of the constants
match, it is sufficient to just check the constant is equal to the
given value.

While we're here also change the FCLASSD rules to use a bit pattern
for the mask. I think this improves readability, particularly as
more uses of FCLASSD get added (e.g. CL 717560).

These changes should not affect codegen.

Change-Id: I92a6338dc71e6a71e04306f67d7d86016c6e9c47
Reviewed-on: https://go-review.googlesource.com/c/go/+/717580
Reviewed-by: Michael Pratt <mpratt@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Keith Randall <khr@golang.org>
Reviewed-by: Keith Randall <khr@google.com>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/_gen/RISCV64.rules
src/cmd/compile/internal/ssa/rewrite.go
src/cmd/compile/internal/ssa/rewriteRISCV64.go