diff options
author | Joel Sing <joel@sing.id.au> | 2020-04-26 04:34:34 +1000 |
---|---|---|
committer | Joel Sing <joel@sing.id.au> | 2020-05-02 18:10:49 +0000 |
commit | 9439a7d87f90b97e00717fc0849d4460628d82d0 (patch) | |
tree | 8d7245499ad676c62b05b343c26af3edf5f5f924 /src/cmd/compile/internal/ssa/gen/RISCV64.rules | |
parent | be08e10b3bc07f3a4e7b27f44d53d582e15fd6c7 (diff) | |
download | go-9439a7d87f90b97e00717fc0849d4460628d82d0.tar.gz go-9439a7d87f90b97e00717fc0849d4460628d82d0.zip |
cmd/compile: use SEQZ pseudo instruction in RISCV64 boolean rules
This makes the intent clearer, allows for another ellipsis and will aid
in future rewriting. While here, document boolean loads to explain register
contents.
Change-Id: I933db2813826d88819366191fbbea8fcee5e4dda
Reviewed-on: https://go-review.googlesource.com/c/go/+/230120
Reviewed-by: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/cmd/compile/internal/ssa/gen/RISCV64.rules')
-rw-r--r-- | src/cmd/compile/internal/ssa/gen/RISCV64.rules | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/ssa/gen/RISCV64.rules b/src/cmd/compile/internal/ssa/gen/RISCV64.rules index 845ca58b6e..fbd87360ac 100644 --- a/src/cmd/compile/internal/ssa/gen/RISCV64.rules +++ b/src/cmd/compile/internal/ssa/gen/RISCV64.rules @@ -414,9 +414,9 @@ // Boolean ops; 0=false, 1=true (AndB ...) => (AND ...) (OrB ...) => (OR ...) -(EqB x y) => (XORI [1] (XOR <typ.Bool> x y)) +(EqB x y) => (SEQZ (XOR <typ.Bool> x y)) (NeqB ...) => (XOR ...) -(Not x) => (XORI [1] x) +(Not ...) => (SEQZ ...) // Lowering pointer arithmetic // TODO: Special handling for SP offsets, like ARM |