[GHC] #13156: CSE missing an easy case

#13156: CSE missing an easy case -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Keywords: | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- Consider this Core: {{{ case f @Int of { r1 -> case f @Int of { r2 -> ... }}} There is an easy common sub-expression to be had here, which would allow to eliminate a case expression, but CSE didn't spot it in GHC 8. Easy to fix. Here's an example that shows it {{{ module Bug where f g x = let r :: [a] -> [a] r = case g x of True -> reverse . reverse False -> reverse in r `seq` r `seq` True }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13156 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#13156: CSE missing an easy case
-------------------------------------+-------------------------------------
Reporter: simonpj | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 8.2.1
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#13156: CSE missing an easy case -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: closed Priority: normal | Milestone: 8.2.1 Component: Compiler | Version: 8.0.1 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: | simplCore/should_compile/T13156 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * testcase: => simplCore/should_compile/T13156 * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/13156#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC