
#10124: Simple case analyses generate too many branches -------------------------------------+------------------------------------- Reporter: bgamari | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.4 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: #6135, #9661 | Differential Revisions: -------------------------------------+------------------------------------- Comment (by bgamari): nomeata, indeed LLVM transforms the C analogue to the example given here into only 9 instructions. I'd agree that it seems better to avoid breaking up the case expression to begin with. This weekend I focused on giving the user the ability to write the branchless implementation explicitly by fixing #9661. It would be nice to have a story for how we could transform cases into branch-less form without user intervention, although I'm not sure how to know when this transform will pay off. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10124#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler