diff options
author | Michael Munday <mike.munday@ibm.com> | 2020-03-06 22:20:45 +0000 |
---|---|---|
committer | Michael Munday <mike.munday@ibm.com> | 2020-04-07 19:55:05 +0000 |
commit | bfd569fcb07440b85c503a399d78bcd6581824a3 (patch) | |
tree | 816cbf6ce9b70de75324275e276fd499a3375b84 /src/cmd/compile/internal/ssa/rewriteMIPS.go | |
parent | 7ee8467b276fbe442df8c84c3d13a99e80519c24 (diff) | |
download | go-bfd569fcb07440b85c503a399d78bcd6581824a3.tar.gz go-bfd569fcb07440b85c503a399d78bcd6581824a3.zip |
cmd/compile: delete the floating point Greater and Geq ops
Extend CL 220417 (which removed the integer Greater and Geq ops) to
floating point comparisons. Greater and Geq can always be
implemented using Less and Leq.
Fixes #37316.
Change-Id: Ieaddb4877dd0ff9037a1dd11d0a9a9e45ced71e7
Reviewed-on: https://go-review.googlesource.com/c/go/+/222397
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/rewriteMIPS.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/rewriteMIPS.go | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/src/cmd/compile/internal/ssa/rewriteMIPS.go b/src/cmd/compile/internal/ssa/rewriteMIPS.go index 9459a56b82..b2fc669310 100644 --- a/src/cmd/compile/internal/ssa/rewriteMIPS.go +++ b/src/cmd/compile/internal/ssa/rewriteMIPS.go @@ -164,10 +164,6 @@ func rewriteValueMIPS(v *Value) bool { return rewriteValueMIPS_OpEqB(v) case OpEqPtr: return rewriteValueMIPS_OpEqPtr(v) - case OpGeq32F: - return rewriteValueMIPS_OpGeq32F(v) - case OpGeq64F: - return rewriteValueMIPS_OpGeq64F(v) case OpGetCallerPC: v.Op = OpMIPSLoweredGetCallerPC return true @@ -177,10 +173,6 @@ func rewriteValueMIPS(v *Value) bool { case OpGetClosurePtr: v.Op = OpMIPSLoweredGetClosurePtr return true - case OpGreater32F: - return rewriteValueMIPS_OpGreater32F(v) - case OpGreater64F: - return rewriteValueMIPS_OpGreater64F(v) case OpHmul32: return rewriteValueMIPS_OpHmul32(v) case OpHmul32u: @@ -1127,70 +1119,6 @@ func rewriteValueMIPS_OpEqPtr(v *Value) bool { return true } } -func rewriteValueMIPS_OpGeq32F(v *Value) bool { - v_1 := v.Args[1] - v_0 := v.Args[0] - b := v.Block - // match: (Geq32F x y) - // result: (FPFlagTrue (CMPGEF x y)) - for { - x := v_0 - y := v_1 - v.reset(OpMIPSFPFlagTrue) - v0 := b.NewValue0(v.Pos, OpMIPSCMPGEF, types.TypeFlags) - v0.AddArg2(x, y) - v.AddArg(v0) - return true - } -} -func rewriteValueMIPS_OpGeq64F(v *Value) bool { - v_1 := v.Args[1] - v_0 := v.Args[0] - b := v.Block - // match: (Geq64F x y) - // result: (FPFlagTrue (CMPGED x y)) - for { - x := v_0 - y := v_1 - v.reset(OpMIPSFPFlagTrue) - v0 := b.NewValue0(v.Pos, OpMIPSCMPGED, types.TypeFlags) - v0.AddArg2(x, y) - v.AddArg(v0) - return true - } -} -func rewriteValueMIPS_OpGreater32F(v *Value) bool { - v_1 := v.Args[1] - v_0 := v.Args[0] - b := v.Block - // match: (Greater32F x y) - // result: (FPFlagTrue (CMPGTF x y)) - for { - x := v_0 - y := v_1 - v.reset(OpMIPSFPFlagTrue) - v0 := b.NewValue0(v.Pos, OpMIPSCMPGTF, types.TypeFlags) - v0.AddArg2(x, y) - v.AddArg(v0) - return true - } -} -func rewriteValueMIPS_OpGreater64F(v *Value) bool { - v_1 := v.Args[1] - v_0 := v.Args[0] - b := v.Block - // match: (Greater64F x y) - // result: (FPFlagTrue (CMPGTD x y)) - for { - x := v_0 - y := v_1 - v.reset(OpMIPSFPFlagTrue) - v0 := b.NewValue0(v.Pos, OpMIPSCMPGTD, types.TypeFlags) - v0.AddArg2(x, y) - v.AddArg(v0) - return true - } -} func rewriteValueMIPS_OpHmul32(v *Value) bool { v_1 := v.Args[1] v_0 := v.Args[0] |