Improve CSE in STG-land
This patch fixes #19717, a long-standing bug in CSE for STG, which led to a stupid loss of CSE in some situations. It's explained in Note [Trivial case scrutinee], which I have substantially extended.
Showing
- compiler/GHC/Stg/CSE.hs 93 additions, 23 deletionscompiler/GHC/Stg/CSE.hs
- testsuite/tests/simplStg/should_compile/T19717.hs 6 additions, 0 deletionstestsuite/tests/simplStg/should_compile/T19717.hs
- testsuite/tests/simplStg/should_compile/T19717.stderr 19 additions, 0 deletionstestsuite/tests/simplStg/should_compile/T19717.stderr
- testsuite/tests/simplStg/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/simplStg/should_compile/all.T
Loading
Please register or sign in to comment