]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: resolve known outcomes for SLTI/SLTIU on riscv64
authorJoel Sing <joel@sing.id.au>
Thu, 1 Sep 2022 10:36:34 +0000 (20:36 +1000)
committerJoel Sing <joel@sing.id.au>
Sat, 17 Sep 2022 17:17:52 +0000 (17:17 +0000)
commita7bcc94719a5a79241aa3ce35c1e2dbb83b94af7
tree21a92ce927b5e943afedccc5615f1a4b66b107e1
parentcc1b20e8adf83865a1dbffa259c7a04ef0699b43
cmd/compile: resolve known outcomes for SLTI/SLTIU on riscv64

When SLTI/SLTIU is used with ANDI/ORI, it may be possible to determine the
outcome based on the values of the immediates. Resolve these cases.

Improves code generation for various shift operations.

While here, sort tests by architecture to improve readability and ease
future maintenance.

Change-Id: I87e71e016a0e396a928e7d6389a2df61583dfd8d
Reviewed-on: https://go-review.googlesource.com/c/go/+/428217
Reviewed-by: Wayne Zuo <wdvxdr@golangcn.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jenny Rakoczy <jenny@golang.org>
Reviewed-by: Jenny Rakoczy <jenny@golang.org>
Run-TryBot: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Jenny Rakoczy <jenny@golang.org>
src/cmd/compile/internal/ssa/gen/RISCV64.rules
src/cmd/compile/internal/ssa/rewriteRISCV64.go
test/codegen/shift.go