aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/opGen.go
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2020-02-06 10:36:29 -0800
committerJosh Bleecher Snyder <josharian@gmail.com>2020-03-02 21:59:19 +0000
commit37fc092be1ffe4906f67eae1c4c7be40f00f89ed (patch)
treec910cdf8d6914941ecd84caeca55e4ac7d959de5 /src/cmd/compile/internal/ssa/opGen.go
parent63f1bc59922d454f288ad3d193bc60d7c980dbb0 (diff)
downloadgo-37fc092be1ffe4906f67eae1c4c7be40f00f89ed.tar.gz
go-37fc092be1ffe4906f67eae1c4c7be40f00f89ed.zip
cmd/compile: remove duplicate ppc64 rules
Const64 gets lowered to MOVDconst. Change rules using interior Const64 to use MOVDconst instead, to be less dependent on rule application order. As a result of doing this, some of the rules end up being exact duplicates; remove those. We had those exact duplicates because of the order dependency; ppc64 had no way to optimize away shifts by a constant if the initial lowering didn't catch it. Add those optimizations as well. The outcome is the same, but this makes the overall rules more robust. Change-Id: Iadd97a9fe73d52358d571d022ace145e506d160b Reviewed-on: https://go-review.googlesource.com/c/go/+/220877 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.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/opGen.go')
-rw-r--r--src/cmd/compile/internal/ssa/opGen.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/ssa/opGen.go b/src/cmd/compile/internal/ssa/opGen.go
index d9d38a8b80..fb887017cf 100644
--- a/src/cmd/compile/internal/ssa/opGen.go
+++ b/src/cmd/compile/internal/ssa/opGen.go
@@ -1881,6 +1881,8 @@ const (
OpPPC64FlagEQ
OpPPC64FlagLT
OpPPC64FlagGT
+ OpPPC64FlagCarrySet
+ OpPPC64FlagCarryClear
OpRISCV64ADD
OpRISCV64ADDI
@@ -24995,6 +24997,16 @@ var opcodeTable = [...]opInfo{
argLen: 0,
reg: regInfo{},
},
+ {
+ name: "FlagCarrySet",
+ argLen: 0,
+ reg: regInfo{},
+ },
+ {
+ name: "FlagCarryClear",
+ argLen: 0,
+ reg: regInfo{},
+ },
{
name: "ADD",