diff options
author | Joel Sing <joel@sing.id.au> | 2020-03-16 03:29:19 +1100 |
---|---|---|
committer | Joel Sing <joel@sing.id.au> | 2020-03-17 01:24:30 +0000 |
commit | 0e44c692c2b39a071257e8be24fa971e6dc05f10 (patch) | |
tree | 1e6a75351ebc424074cf9980726a395514636d42 /src/cmd/compile/internal/ssa/gen/RISCV64.rules | |
parent | 2f54081adfc967836842c96619d241378400ece6 (diff) | |
download | go-0e44c692c2b39a071257e8be24fa971e6dc05f10.tar.gz go-0e44c692c2b39a071257e8be24fa971e6dc05f10.zip |
cmd/compile: use NOT pseudo-instruction for riscv64 Slicemask
Change-Id: Idefb6669d54929065f57e3bd767c91451dc3a375
Reviewed-on: https://go-review.googlesource.com/c/go/+/223562
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/gen/RISCV64.rules')
-rw-r--r-- | src/cmd/compile/internal/ssa/gen/RISCV64.rules | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ssa/gen/RISCV64.rules b/src/cmd/compile/internal/ssa/gen/RISCV64.rules index a4b141b4fb9..fba431368b6 100644 --- a/src/cmd/compile/internal/ssa/gen/RISCV64.rules +++ b/src/cmd/compile/internal/ssa/gen/RISCV64.rules @@ -143,7 +143,7 @@ // For positive x, bit 63 of x-1 is always 0, so the result is -1. // For zero x, bit 63 of x-1 is 1, so the result is 0. // -(Slicemask <t> x) -> (XORI [-1] (SRAI <t> [63] (ADDI <t> [-1] x))) +(Slicemask <t> x) -> (NOT (SRAI <t> [63] (ADDI <t> [-1] x))) // Truncations // We ignore the unused high parts of registers, so truncates are just copies. |