#11533: Stack check not optimized out even if it could be -------------------------------------+------------------------------------- Reporter: jscholl | Owner: Type: bug | Status: patch Priority: normal | Milestone: Component: Compiler | Version: 7.10.3 (CodeGen) | Resolution: | Keywords: cmm Operating System: Unknown/Multiple | Architecture: Type of failure: Runtime | Unknown/Multiple performance bug | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D1881 Wiki Page: | -------------------------------------+------------------------------------- Comment (by Ben Gamari <ben@…>): In [changeset:"4ec61411930495fc109be27993c176fd7aaf486d/ghc" 4ec61411/ghc]: {{{ #!CommitTicketReference repository="ghc" revision="4ec61411930495fc109be27993c176fd7aaf486d" Fix the removal of unnecessary stack checks The module CmmLayoutStack removes stack checks if a function does not use stack space. However, it can only recognize checks of the form Sp < SpLim. However, these checks get sometimes rewritten to Sp >= SpLim (with both branches swapped), so we better recognize these checks too. Test Plan: ./validate Reviewers: austin, bgamari, simonpj Reviewed By: simonpj Subscribers: simonpj, thomie Differential Revision: https://phabricator.haskell.org/D1881 GHC Trac Issues: #11533 }}} -- Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11533#comment:2> GHC <http://www.haskell.org/ghc/> The Glasgow Haskell Compiler