[commit: ghc] ghc-7.10: Be aware of overlapping global STG registers in CmmSink (#10521) (7707e54)
git at git.haskell.org
git at git.haskell.org
Fri Jun 26 19:25:42 UTC 2015
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-7.10
Link : http://ghc.haskell.org/trac/ghc/changeset/7707e54c0e3e3dc7bd7b0f44a9567770340ace31/ghc
>---------------------------------------------------------------
commit 7707e54c0e3e3dc7bd7b0f44a9567770340ace31
Author: Reid Barton <rwbarton at gmail.com>
Date: Thu Jun 25 13:53:57 2015 -0400
Be aware of overlapping global STG registers in CmmSink (#10521)
Summary:
On x86_64, commit e2f6bbd3a27685bc667655fdb093734cb565b4cf assigned
the STG registers F1 and D1 the same hardware register (xmm1), and
the same for the registers F2 and D2, etc. When mixing calls to
functions involving Float#s and Double#s, this can cause wrong Cmm
optimizations that assume the F1 and D1 registers are independent.
Reviewers: simonpj, austin
Reviewed By: austin
Subscribers: simonpj, thomie, bgamari
Differential Revision: https://phabricator.haskell.org/D993
GHC Trac Issues: #10521
(cherry picked from commit a2f828a370b220839ad9b31a274c0198ef91b7fe)
>---------------------------------------------------------------
7707e54c0e3e3dc7bd7b0f44a9567770340ace31
compiler/cmm/CmmExpr.hs | 37 +++++++++++++++-------
compiler/cmm/CmmSink.hs | 15 ++++-----
compiler/cmm/CmmUtils.hs | 36 +++++++++++++++++++++
compiler/codeGen/StgCmmUtils.hs | 16 ++++++----
includes/stg/MachRegs.h | 6 ++++
testsuite/.gitignore | 2 ++
testsuite/tests/codeGen/should_run/T10521.hs | 11 +++++++
testsuite/tests/codeGen/should_run/T10521.stdout | 1 +
testsuite/tests/codeGen/should_run/T10521b.hs | 18 +++++++++++
.../should_run/{T5747.stdout => T10521b.stdout} | 0
testsuite/tests/codeGen/should_run/all.T | 2 ++
11 files changed, 117 insertions(+), 27 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 7707e54c0e3e3dc7bd7b0f44a9567770340ace31
More information about the ghc-commits
mailing list