aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/gen/RISCV64.rules
diff options
context:
space:
mode:
authorMichael Munday <mike.munday@ibm.com>2020-02-20 17:46:08 +0000
committerMichael Munday <mike.munday@ibm.com>2020-02-26 13:11:53 +0000
commitcb74dcc172de2779a2f65ea830f687156c98ad50 (patch)
treef94450c829e15288289bcf99f27b91ede70954eb /src/cmd/compile/internal/ssa/gen/RISCV64.rules
parent44fe355694798b5e1c55fc087e697886e93e633e (diff)
downloadgo-cb74dcc172de2779a2f65ea830f687156c98ad50.tar.gz
go-cb74dcc172de2779a2f65ea830f687156c98ad50.zip
cmd/compile: remove Greater* and Geq* generic integer ops
The generic Greater and Geq ops can always be replaced with the Less and Leq ops. This CL therefore removes them. This simplifies the compiler since it reduces the number of operations that need handling in both code and in rewrite rules. This will be especially true when adding control flow optimizations such as the integer-in-range optimizations in CL 165998. Change-Id: If0648b2b19998ac1bddccbf251283f3be4ec3040 Reviewed-on: https://go-review.googlesource.com/c/go/+/220417 Run-TryBot: Michael Munday <mike.munday@ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> 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.rules16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/cmd/compile/internal/ssa/gen/RISCV64.rules b/src/cmd/compile/internal/ssa/gen/RISCV64.rules
index 2b4f83b26e..711f904f0d 100644
--- a/src/cmd/compile/internal/ssa/gen/RISCV64.rules
+++ b/src/cmd/compile/internal/ssa/gen/RISCV64.rules
@@ -258,26 +258,10 @@
(Leq32F ...) -> (FLES ...)
// Convert x > y to y < x.
-(Greater64 x y) -> (Less64 y x)
-(Greater32 x y) -> (Less32 y x)
-(Greater16 x y) -> (Less16 y x)
-(Greater8 x y) -> (Less8 y x)
-(Greater64U x y) -> (Less64U y x)
-(Greater32U x y) -> (Less32U y x)
-(Greater16U x y) -> (Less16U y x)
-(Greater8U x y) -> (Less8U y x)
(Greater64F x y) -> (FLTD y x)
(Greater32F x y) -> (FLTS y x)
// Convert x >= y to !(x < y)
-(Geq64 x y) -> (Not (Less64 x y))
-(Geq32 x y) -> (Not (Less32 x y))
-(Geq16 x y) -> (Not (Less16 x y))
-(Geq8 x y) -> (Not (Less8 x y))
-(Geq64U x y) -> (Not (Less64U x y))
-(Geq32U x y) -> (Not (Less32U x y))
-(Geq16U x y) -> (Not (Less16U x y))
-(Geq8U x y) -> (Not (Less8U x y))
(Geq64F x y) -> (FLED y x)
(Geq32F x y) -> (FLES y x)