]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: remove NEG when used with SEQZ/SNEZ on riscv64
authorJoel Sing <joel@sing.id.au>
Sat, 27 Aug 2022 20:08:02 +0000 (06:08 +1000)
committerJoel Sing <joel@sing.id.au>
Wed, 31 Aug 2022 20:08:03 +0000 (20:08 +0000)
commit971373f56a5e47e523c7ac7f097349b83f5d31b5
treedeae620516fa8bb68dd014fe5964d1d2915d28b4
parent239115c3efcc54fb4f3f306032af40e03f5c66a8
cmd/compile: remove NEG when used with SEQZ/SNEZ on riscv64

The negation does not change the comparison to zero.

Also remove unnecessary x.Uses == 1 condition from equivalent BEQZ/BNEZ rules.

Change-Id: I62dd8e383e42bfe5c46d11bbf78d8e5ff862a1d5
Reviewed-on: https://go-review.googlesource.com/c/go/+/426262
Reviewed-by: Cherry Mui <cherryyz@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Heschi Kreinick <heschi@google.com>
src/cmd/compile/internal/ssa/gen/RISCV64.rules
src/cmd/compile/internal/ssa/rewriteRISCV64.go