
#7460: Double literals generated bad core -------------------------------------+------------------------------------- Reporter: tibbe | Owner: tibbe Type: bug | Status: closed Priority: normal | Milestone: 7.10.1 Component: Compiler | Version: 7.4.2 Resolution: fixed | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: Runtime | Blocked By: performance bug | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * resolution: => fixed Comment: The word2Float and word2Double primops were added, which solved this issue. The output of `ghc-7.6.3 -ddump-simpl -O2 test.hs` contained calls to `doubleFromInteger`, but the same command using `ghc-7.8.3` does not (which is good). Other things must have changed as well, because the code is about twice as fast with 7.8.3, while comment:8 talked about a difference of only 20%. commit 2e8c769422740c001e0a247bfec61d4f78598582 {{{ Author: Johan Tibell <> Date: Wed Dec 5 19:08:48 2012 -0800 Implement word2Float# and word2Double# }}} commit cd01e48fbc548ff8d81ab547108bfdde8a113cd7 {{{ Author: Johan Tibell <> Date: Thu Dec 13 12:03:40 2012 -0800 Add test for word2Double# and word2Float# }}} commit a18cf9cbdfec08732f5b7e0c886a5d899a6a5998 {{{ Author: Johan Tibell <> Date: Thu Dec 13 14:49:58 2012 -0800 Add fromIntegral/Word->Double and fromIntegral/Word-Float rules }}} commit 8cd4ced57dccc1f4f54d242982209ec61e145700 {{{ Author: Johan Tibell <> Date: Tue Dec 18 14:40:02 2012 +0100 perf test for Word->Float/Double conversion }}} commit 6d5f25f5e0b33173fb2e7983cab40808c723f220 {{{ Author: Geoffrey Mainland <> Date: Thu Jan 3 16:59:03 2013 +0000 Fix LLVM code generated for word2Float# and word2Double#. }}} commit 744035fdd4b882c17ef7c6e4439b9e7099e7ec3d {{{ Author: Johan Tibell <> Date: Mon Jan 7 21:35:07 2013 -0800 Fix Word2Float# test on 32-bit }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/7460#comment:15 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler