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/rewriteS390X.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/rewriteS390X.go')
-rw-r--r-- | src/cmd/compile/internal/ssa/rewriteS390X.go | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/src/cmd/compile/internal/ssa/rewriteS390X.go b/src/cmd/compile/internal/ssa/rewriteS390X.go index 83f8d31f82..84dae5a734 100644 --- a/src/cmd/compile/internal/ssa/rewriteS390X.go +++ b/src/cmd/compile/internal/ssa/rewriteS390X.go @@ -254,10 +254,6 @@ func rewriteValueS390X(v *Value) bool { return rewriteValueS390X_OpFMA(v) case OpFloor: return rewriteValueS390X_OpFloor(v) - case OpGeq32F: - return rewriteValueS390X_OpGeq32F(v) - case OpGeq64F: - return rewriteValueS390X_OpGeq64F(v) case OpGetCallerPC: v.Op = OpS390XLoweredGetCallerPC return true @@ -270,10 +266,6 @@ func rewriteValueS390X(v *Value) bool { case OpGetG: v.Op = OpS390XLoweredGetG return true - case OpGreater32F: - return rewriteValueS390X_OpGreater32F(v) - case OpGreater64F: - return rewriteValueS390X_OpGreater64F(v) case OpHmul32: return rewriteValueS390X_OpHmul32(v) case OpHmul32u: @@ -1525,94 +1517,6 @@ func rewriteValueS390X_OpFloor(v *Value) bool { return true } } -func rewriteValueS390X_OpGeq32F(v *Value) bool { - v_1 := v.Args[1] - v_0 := v.Args[0] - b := v.Block - typ := &b.Func.Config.Types - // match: (Geq32F x y) - // result: (LOCGR {s390x.GreaterOrEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y)) - for { - x := v_0 - y := v_1 - v.reset(OpS390XLOCGR) - v.Aux = s390x.GreaterOrEqual - v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) - v0.AuxInt = 0 - v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) - v1.AuxInt = 1 - v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags) - v2.AddArg2(x, y) - v.AddArg3(v0, v1, v2) - return true - } -} -func rewriteValueS390X_OpGeq64F(v *Value) bool { - v_1 := v.Args[1] - v_0 := v.Args[0] - b := v.Block - typ := &b.Func.Config.Types - // match: (Geq64F x y) - // result: (LOCGR {s390x.GreaterOrEqual} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y)) - for { - x := v_0 - y := v_1 - v.reset(OpS390XLOCGR) - v.Aux = s390x.GreaterOrEqual - v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) - v0.AuxInt = 0 - v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) - v1.AuxInt = 1 - v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags) - v2.AddArg2(x, y) - v.AddArg3(v0, v1, v2) - return true - } -} -func rewriteValueS390X_OpGreater32F(v *Value) bool { - v_1 := v.Args[1] - v_0 := v.Args[0] - b := v.Block - typ := &b.Func.Config.Types - // match: (Greater32F x y) - // result: (LOCGR {s390x.Greater} (MOVDconst [0]) (MOVDconst [1]) (FCMPS x y)) - for { - x := v_0 - y := v_1 - v.reset(OpS390XLOCGR) - v.Aux = s390x.Greater - v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) - v0.AuxInt = 0 - v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) - v1.AuxInt = 1 - v2 := b.NewValue0(v.Pos, OpS390XFCMPS, types.TypeFlags) - v2.AddArg2(x, y) - v.AddArg3(v0, v1, v2) - return true - } -} -func rewriteValueS390X_OpGreater64F(v *Value) bool { - v_1 := v.Args[1] - v_0 := v.Args[0] - b := v.Block - typ := &b.Func.Config.Types - // match: (Greater64F x y) - // result: (LOCGR {s390x.Greater} (MOVDconst [0]) (MOVDconst [1]) (FCMP x y)) - for { - x := v_0 - y := v_1 - v.reset(OpS390XLOCGR) - v.Aux = s390x.Greater - v0 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) - v0.AuxInt = 0 - v1 := b.NewValue0(v.Pos, OpS390XMOVDconst, typ.UInt64) - v1.AuxInt = 1 - v2 := b.NewValue0(v.Pos, OpS390XFCMP, types.TypeFlags) - v2.AddArg2(x, y) - v.AddArg3(v0, v1, v2) - return true - } -} func rewriteValueS390X_OpHmul32(v *Value) bool { v_1 := v.Args[1] v_0 := v.Args[0] |