[GHC] #13338: New versions of time and Cabal are causing a Core Lint error on Windows
GHC
ghc-devs at haskell.org
Tue Feb 28 15:59:06 UTC 2017
#13338: New versions of time and Cabal are causing a Core Lint error on Windows
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner: (none)
Type: bug | Status: patch
Priority: highest | Milestone: 8.2.1
Component: Compiler | Version: 8.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
| simplCore/should_compile/T13338
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D3217
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"d0508ef001e9c93920f6eb066cab5e79041cb886/ghc" d0508ef/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="d0508ef001e9c93920f6eb066cab5e79041cb886"
When floating, don't box an expression that's okay for speculation
(#13338)
Commit 432f952e (Float unboxed expressions by boxing) lets the float-out
pass
turn, for example,
... (-# (remInt# x# 100000#) i#) ...
into
let lvl :: Int
lvl = case remInt# x# 100000# of v { __DEFAULT__ -> I# v }
in ... (-# (case lvl of { I# v -> v }) i#) ...
But when, as in the example above, the expression that was floated out was
the argument of an application, the resulting application may no longer
satisfy the let/app invariant, because exprOkForSpeculation doesn't look
far enough inside the definition of lvl.
Solution: When the expression we floated out was okay for speculation,
don't
bother boxing it. It will be evaluated earlier, and that's okay by
assumption.
Fixes the let/app invariant and is cheaper too.
Test Plan: make slowtest TEST=T13338
Reviewers: austin, bgamari, simonpj
Reviewed By: bgamari, simonpj
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3217
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13338#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list