aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ppc64
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/ppc64
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/ppc64')
-rw-r--r--src/cmd/compile/internal/ppc64/ssa.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/ppc64/ssa.go b/src/cmd/compile/internal/ppc64/ssa.go
index 591f3666e7..ce30c9ae37 100644
--- a/src/cmd/compile/internal/ppc64/ssa.go
+++ b/src/cmd/compile/internal/ppc64/ssa.go
@@ -1328,7 +1328,7 @@ func ssaGenValue(s *gc.SSAGenState, v *ssa.Value) {
v.Fatalf("Pseudo-op should not make it to codegen: %s ###\n", v.LongString())
case ssa.OpPPC64InvertFlags:
v.Fatalf("InvertFlags should never make it to codegen %v", v.LongString())
- case ssa.OpPPC64FlagEQ, ssa.OpPPC64FlagLT, ssa.OpPPC64FlagGT:
+ case ssa.OpPPC64FlagEQ, ssa.OpPPC64FlagLT, ssa.OpPPC64FlagGT, ssa.OpPPC64FlagCarrySet, ssa.OpPPC64FlagCarryClear:
v.Fatalf("Flag* ops should never make it to codegen %v", v.LongString())
case ssa.OpClobber:
// TODO: implement for clobberdead experiment. Nop is ok for now.