aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/rewritePPC64.go
diff options
context:
space:
mode:
authorPaul E. Murphy <murp@ibm.com>2020-08-20 15:06:06 -0500
committerLynn Boger <laboger@linux.vnet.ibm.com>2020-08-27 13:07:57 +0000
commit2aba467933b3252c758b65146d2ea5a5cff196da (patch)
tree518f623f66f47b0de0a9cf3582823b321eaa7e44 /src/cmd/compile/internal/ssa/rewritePPC64.go
parent47b450997778163dfed6f58cae379d928fc37687 (diff)
downloadgo-2aba467933b3252c758b65146d2ea5a5cff196da.tar.gz
go-2aba467933b3252c758b65146d2ea5a5cff196da.zip
cmd/compile: remove unused carry related ssa ops in ppc64
The intermediate SSA opcodes* are no longer generated during the lowering pass. The shifting rules have been improved using ISEL. Therefore, we can remove them and the rules which expand them. * The removed opcodes are: LoweredAdd64Carry ADDconstForCarry MaskIfNotCarry FlagCarryClear FlagCarrySet Change-Id: I1ebe2726ed988f29ed4800c8f57b428f7a214cd0 Reviewed-on: https://go-review.googlesource.com/c/go/+/249462 Run-TryBot: Lynn Boger <laboger@linux.vnet.ibm.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Diffstat (limited to 'src/cmd/compile/internal/ssa/rewritePPC64.go')
-rw-r--r--src/cmd/compile/internal/ssa/rewritePPC64.go82
1 files changed, 0 insertions, 82 deletions
diff --git a/src/cmd/compile/internal/ssa/rewritePPC64.go b/src/cmd/compile/internal/ssa/rewritePPC64.go
index 7704b80dc6..1a0b03e81c 100644
--- a/src/cmd/compile/internal/ssa/rewritePPC64.go
+++ b/src/cmd/compile/internal/ssa/rewritePPC64.go
@@ -428,8 +428,6 @@ func rewriteValuePPC64(v *Value) bool {
return rewriteValuePPC64_OpPPC64ADD(v)
case OpPPC64ADDconst:
return rewriteValuePPC64_OpPPC64ADDconst(v)
- case OpPPC64ADDconstForCarry:
- return rewriteValuePPC64_OpPPC64ADDconstForCarry(v)
case OpPPC64AND:
return rewriteValuePPC64_OpPPC64AND(v)
case OpPPC64ANDN:
@@ -570,8 +568,6 @@ func rewriteValuePPC64(v *Value) bool {
return rewriteValuePPC64_OpPPC64MOVWstorezero(v)
case OpPPC64MTVSRD:
return rewriteValuePPC64_OpPPC64MTVSRD(v)
- case OpPPC64MaskIfNotCarry:
- return rewriteValuePPC64_OpPPC64MaskIfNotCarry(v)
case OpPPC64NOR:
return rewriteValuePPC64_OpPPC64NOR(v)
case OpPPC64NotEqual:
@@ -4075,40 +4071,6 @@ func rewriteValuePPC64_OpPPC64ADDconst(v *Value) bool {
}
return false
}
-func rewriteValuePPC64_OpPPC64ADDconstForCarry(v *Value) bool {
- v_0 := v.Args[0]
- // match: (ADDconstForCarry [c] (MOVDconst [d]))
- // cond: c < 0 && (c < 0 || int64(c) + d >= 0)
- // result: (FlagCarryClear)
- for {
- c := auxIntToInt16(v.AuxInt)
- if v_0.Op != OpPPC64MOVDconst {
- break
- }
- d := auxIntToInt64(v_0.AuxInt)
- if !(c < 0 && (c < 0 || int64(c)+d >= 0)) {
- break
- }
- v.reset(OpPPC64FlagCarryClear)
- return true
- }
- // match: (ADDconstForCarry [c] (MOVDconst [d]))
- // cond: c < 0 && c >= 0 && int64(c) + d < 0
- // result: (FlagCarrySet)
- for {
- c := auxIntToInt16(v.AuxInt)
- if v_0.Op != OpPPC64MOVDconst {
- break
- }
- d := auxIntToInt64(v_0.AuxInt)
- if !(c < 0 && c >= 0 && int64(c)+d < 0) {
- break
- }
- v.reset(OpPPC64FlagCarrySet)
- return true
- }
- return false
-}
func rewriteValuePPC64_OpPPC64AND(v *Value) bool {
v_1 := v.Args[1]
v_0 := v.Args[0]
@@ -10374,50 +10336,6 @@ func rewriteValuePPC64_OpPPC64MTVSRD(v *Value) bool {
}
return false
}
-func rewriteValuePPC64_OpPPC64MaskIfNotCarry(v *Value) bool {
- v_0 := v.Args[0]
- // match: (MaskIfNotCarry (ADDconstForCarry [c] (ANDconst [d] _)))
- // cond: c < 0 && d > 0 && int64(c) + d < 0
- // result: (MOVDconst [-1])
- for {
- if v_0.Op != OpPPC64ADDconstForCarry {
- break
- }
- c := auxIntToInt16(v_0.AuxInt)
- v_0_0 := v_0.Args[0]
- if v_0_0.Op != OpPPC64ANDconst {
- break
- }
- d := auxIntToInt64(v_0_0.AuxInt)
- if !(c < 0 && d > 0 && int64(c)+d < 0) {
- break
- }
- v.reset(OpPPC64MOVDconst)
- v.AuxInt = int64ToAuxInt(-1)
- return true
- }
- // match: (MaskIfNotCarry (FlagCarrySet))
- // result: (MOVDconst [0])
- for {
- if v_0.Op != OpPPC64FlagCarrySet {
- break
- }
- v.reset(OpPPC64MOVDconst)
- v.AuxInt = int64ToAuxInt(0)
- return true
- }
- // match: (MaskIfNotCarry (FlagCarryClear))
- // result: (MOVDconst [-1])
- for {
- if v_0.Op != OpPPC64FlagCarryClear {
- break
- }
- v.reset(OpPPC64MOVDconst)
- v.AuxInt = int64ToAuxInt(-1)
- return true
- }
- return false
-}
func rewriteValuePPC64_OpPPC64NOR(v *Value) bool {
v_1 := v.Args[1]
v_0 := v.Args[0]