]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: convert branch with zero to more optimal branch zero on riscv64
authorJoel Sing <joel@sing.id.au>
Tue, 17 Aug 2021 09:01:52 +0000 (19:01 +1000)
committerJoel Sing <joel@sing.id.au>
Sat, 21 Aug 2021 11:22:07 +0000 (11:22 +0000)
commitbcd146d398da2a873bb3f5a6e026c70b411a4486
treea81df93abbe37d417d3bb0f81af3148749f81724
parentdcee007aad6cca16cec0383a394dd7db92cd6790
cmd/compile: convert branch with zero to more optimal branch zero on riscv64

Convert BLT and BGE with a zero valued constant to BGTZ/BLTZ/BLEZ/BGEZ as
appropriate.

Removes over 4,500 instructions from the go binary on riscv64.

Change-Id: Icc266e968b126ba04863ec88529630a9dd44498b
Reviewed-on: https://go-review.googlesource.com/c/go/+/342849
Trust: Joel Sing <joel@sing.id.au>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
src/cmd/compile/internal/ssa/gen/RISCV64.rules
src/cmd/compile/internal/ssa/rewriteRISCV64.go