aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/ssa/gen/S390X.rules
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2017-04-10 08:47:50 -0400
committerRuss Cox <rsc@golang.org>2017-04-10 08:48:35 -0400
commit1ba29926f3bfd245d46cf1f287716290bc2f1034 (patch)
tree7943978dc881798400b21d29071532b9da38f3d2 /src/cmd/compile/internal/ssa/gen/S390X.rules
parent0954fdd51e390e209317d4652d7effc15512fd50 (diff)
parenta4c18f063b6659079ca2848ca217a0587dabc001 (diff)
downloadgo-1ba29926f3bfd245d46cf1f287716290bc2f1034.tar.gz
go-1ba29926f3bfd245d46cf1f287716290bc2f1034.zip
[dev.typealias] dev.typealias: merge go1.8.1 into dev.typealias
This also includes fixes since Go 1.8rc3. a4c18f063b [release-branch.go1.8] go1.8.1 8babce23e3 [release-branch.go1.8] doc: document go1.8.1 853d533ed6 [release-branch.go1.8] cmd/go: add test for test -race -i behavior 166f2159d8 [release-branch.go1.8] cmd/go: do not install broken libraries during 'go test -i -race' 95a5b80e6d [release-branch.go1.8] cmd/compile: added special case for reflect header fields to esc fe79c75268 [release-branch.go1.8] cmd/compile: add missing WBs for reflect.{Slice,String}Header.Data d7989b784e [release-branch.go1.8] cmd/link: skip TestDWARF when cgo is disabled 056be9f79c [release-branch.go1.8] cmd/link: skip TestDWARF on Plan 9 02240408a1 [release-branch.go1.8] encoding/xml: disable checking of attribute syntax, like Go 1.7 04017ffadf [release-branch.go1.8] reflect: fix out-of-bounds pointers calling no-result method 2d0043014f [release-branch.go1.8] cmd/link: emit a mach-o dwarf segment that dsymutil will accept 3ca0d34fa1 [release-branch.go1.8] cmd/link: make mach-o dwarf segment properly aligned 84192f2734 [release-branch.go1.8] cmd/link: disable mach-o dwarf munging with -w (in addition to -s) 752b8b773d [release-branch.go1.8] cmd/compile: don't crash when slicing non-slice ff5695d0fd [release-branch.go1.8] runtime: print user stack on other threads during GOTRACBEACK=crash 517a38c630 [release-branch.go1.8] test/fixedbugs: add test for #19403 dc70a5efd1 [release-branch.go1.8] cmd/compile: mark MOVWF/MOVFW clobbering F15 on ARM 77476e81d9 [release-branch.go1.8] cmd/compile,runtime: fix atomic And8 for mipsle bf71119d54 [release-branch.go1.8] cmd/compile: repaired loop-finder to handle trickier nesting 11a224bc56 [release-branch.go1.8] cmd/compile: add opcode flag hasSideEffects for do-not-remove 3a8841bcaf [release-branch.go1.8] cmd/link: do not pass -s through to host linker on macOS 6c5abcf21a [release-branch.go1.8] text/template: fix handling of empty blocks 43fa04c23c [release-branch.go1.8] image/png: restore Go 1.7 rejection of transparent gray8 images e35c01b404 [release-branch.go1.8] net, net/http: adjust time-in-past constant even earlier c955eb1935 [release-branch.go1.8] cmd/compile/internal/ssa: don't schedule values after select f8ed4539eb [release-branch.go1.8] os/exec: deflake TestStdinCloseRace d43130743c [release-branch.go1.8] cmd/link: put plt stubs first in Textp on ppc64x 0a5cec792f [release-branch.go1.8] doc: reorganize the contribution guidelines into a guide 8890527476 [release-branch.go1.8] time: make the ParseInLocation test more robust ea6781bcd0 [release-branch.go1.8] crypto/tls: make Config.Clone also clone the GetClientCertificate field 2327d696c1 [release-branch.go1.8] cmd/compile: do not fold offset into load/store for args on ARM64 ba48d2002e [release-branch.go1.8] cmd/compile: check both syms when folding address into load/store on ARM64 b43fabfb30 [release-branch.go1.8] cmd/compile: add zero-extension before right shift when lowering Lrot on ARM 6a712dfac1 [release-branch.go1.8] cmd/compile: fix merging of s390x conditional moves into branch conditions 865536b197 [release-branch.go1.8] cmd/compile: remove unnecessary type conversions on s390x bae53daa72 [release-branch.go1.8] runtime: avoid O(n) semaphore list walk in contention profiling d4ee1f4a40 [release-branch.go1.8] website: mention go1.8 in project page 991ee8f4ac [release-branch.go1.8] doc: fix broken link in go1.8.html cd6b6202dd [release-branch.go1.8] go1.8 606eb9b0c1 [release-branch.go1.8] doc: document go1.8 bcda91c18d [release-branch.go1.8] runtime: do not call wakep from enlistWorker, to avoid possible deadlock 7d7a0a9d64 [release-branch.go1.8] doc: update Code of Conduct wording and scope cedc511a6e [release-branch.go1.8] encoding/xml: fix incorrect indirect code in chardata, comment, innerxml fields ae13ccfd6d [release-branch.go1.8] database/sql: convert test timeouts to explicit waits with checks 7cec9a583d [release-branch.go1.8] reflect: clear ptrToThis in Ptr when allocating result on heap d84dee069a [release-branch.go1.8] database/sql: ensure driverConns are closed if not returned to pool f1e44a4b74 [release-branch.go1.8] database/sql: do not exhaust connection pool on conn request timeout 3ade54063e [release-branch.go1.8] database/sql: record the context error in Rows if canceled 0545006bdb [release-branch.go1.8] crypto/x509: check for new tls-ca-bundle.pem last 1363eeba65 [release-branch.go1.8] cmd/go, go/build: better defenses against GOPATH=GOROOT 1edfd64761 [release-branch.go1.8] cmd/compile: do not use "oaslit" for global 6eb0f5440e [release-branch.go1.8] cmd/compile/internal/syntax: avoid follow-up error for incorrect if statement c543cc353d [release-branch.go1.8] cmd/compile/internal/syntax: make a parser error "1.7 compliant" f0749fe163 [release-branch.go1.8] cmd/link: use external linking for PIE by default ba878ac0c8 [release-branch.go1.8] doc: remove inactive members of the CoC working group 6177f6d448 [release-branch.go1.8] vendor/golang.org/x/crypto/curve25519: avoid loss of R15 in -dynlink mode 67cd1fa780 [release-branch.go1.8] cmd/compile: do not fold large offset on ARM64 Change-Id: I907afba886429c4feb36c9895f16046eeab4ad5f
Diffstat (limited to 'src/cmd/compile/internal/ssa/gen/S390X.rules')
-rw-r--r--src/cmd/compile/internal/ssa/gen/S390X.rules12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/cmd/compile/internal/ssa/gen/S390X.rules b/src/cmd/compile/internal/ssa/gen/S390X.rules
index c26515c569..7ecea02dae 100644
--- a/src/cmd/compile/internal/ssa/gen/S390X.rules
+++ b/src/cmd/compile/internal/ssa/gen/S390X.rules
@@ -440,7 +440,7 @@
(If (MOVDGTnoinv (MOVDconst [0]) (MOVDconst [1]) cmp) yes no) -> (GTF cmp yes no)
(If (MOVDGEnoinv (MOVDconst [0]) (MOVDconst [1]) cmp) yes no) -> (GEF cmp yes no)
-(If cond yes no) -> (NE (CMPWconst [0] (MOVBZreg cond)) yes no)
+(If cond yes no) -> (NE (CMPWconst [0] (MOVBZreg <config.fe.TypeBool()> cond)) yes no)
// ***************************
// Above: lowering rules
@@ -448,7 +448,15 @@
// ***************************
// TODO: Should the optimizations be a separate pass?
-// if a register move has only 1 use, just use the same register without emitting instruction
+// Fold unnecessary type conversions.
+(MOVDreg <t> x) && t.Compare(x.Type) == CMPeq -> x
+(MOVDnop <t> x) && t.Compare(x.Type) == CMPeq -> x
+
+// Propagate constants through type conversions.
+(MOVDreg (MOVDconst [c])) -> (MOVDconst [c])
+(MOVDnop (MOVDconst [c])) -> (MOVDconst [c])
+
+// If a register move has only 1 use, just use the same register without emitting instruction.
// MOVDnop doesn't emit instruction, only for ensuring the type.
(MOVDreg x) && x.Uses == 1 -> (MOVDnop x)