Fix eta reduction
Issue #23922 showed that GHC was bogusly eta-reducing a join point. We should never eta-reduce (\x -> j x) to j, if j is a join point. It is extremly difficult to trigger this bug. It took me 45 mins of trying to make a small tests case, here immortalised as T23922a.
Showing
- compiler/GHC/Core/Opt/Arity.hs 34 additions, 22 deletionscompiler/GHC/Core/Opt/Arity.hs
- testsuite/tests/simplCore/should_compile/T23922a.hs 19 additions, 0 deletionstestsuite/tests/simplCore/should_compile/T23922a.hs
- testsuite/tests/simplCore/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/simplCore/should_compile/all.T
Loading
Please register or sign in to comment