diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2022-08-29 13:29:05 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-10-25 18:07:03 -0400 |
commit | 41406da55db1915cf1360e3275657f2b1115d530 (patch) | |
tree | 5fca2b233288a85eb9248d872cb47c6b44f21de7 /testsuite/tests | |
parent | 8d2dbe2db4cc7c8b6d39b1ea64b0508304a3273c (diff) | |
download | haskell-41406da55db1915cf1360e3275657f2b1115d530.tar.gz |
Fix binder-swap bug
This patch fixes #21229 properly, by avoiding doing a
binder-swap on dictionary Ids. This is pretty subtle, and explained
in Note [Care with binder-swap on dictionaries].
Test is already in simplCore/should_run/T21229
This allows us to restore a feature to the specialiser that we had
to revert: see Note [Specialising polymorphic dictionaries].
(This is done in a separate patch.)
I also modularised things, using a new function scrutBinderSwap_maybe
in all the places where we are (effectively) doing a binder-swap,
notably
* Simplify.Iteration.addAltUnfoldings
* SpecConstr.extendCaseBndrs
In Simplify.Iteration.addAltUnfoldings I also eliminated a guard
Many <- idMult case_bndr
because we concluded, in #22123, that it was doing no good.
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/linters/notes.stdout | 1 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_compile/all.T | 1 |
2 files changed, 0 insertions, 2 deletions
diff --git a/testsuite/tests/linters/notes.stdout b/testsuite/tests/linters/notes.stdout index ac7a453445..b50da6b3a2 100644 --- a/testsuite/tests/linters/notes.stdout +++ b/testsuite/tests/linters/notes.stdout @@ -2,7 +2,6 @@ ref compiler/GHC/Core/Coercion/Axiom.hs:461:2: Note [RoughMap and rm_empt ref compiler/GHC/Core/Opt/OccurAnal.hs:857:15: Note [Loop breaking] ref compiler/GHC/Core/Opt/SetLevels.hs:1580:30: Note [Top level scope] ref compiler/GHC/Core/Opt/Simplify/Iteration.hs:2675:13: Note [Case binder next] -ref compiler/GHC/Core/Opt/Simplify/Iteration.hs:3303:0: Note [Suppressing binder-swaps on linear case] ref compiler/GHC/Core/Opt/Simplify/Iteration.hs:3854:8: Note [Lambda-bound unfoldings] ref compiler/GHC/Core/Opt/Simplify/Utils.hs:1257:37: Note [Gentle mode] ref compiler/GHC/Core/Opt/Specialise.hs:1623:28: Note [Arity decrease] diff --git a/testsuite/tests/simplCore/should_compile/all.T b/testsuite/tests/simplCore/should_compile/all.T index fc708ef9f0..9cbd330d0b 100644 --- a/testsuite/tests/simplCore/should_compile/all.T +++ b/testsuite/tests/simplCore/should_compile/all.T @@ -359,7 +359,6 @@ test('T19586', normal, compile, ['']) test('T19599', normal, compile, ['-O -ddump-rules']) test('T19599a', normal, compile, ['-O -ddump-rules']) -test('T13873', [expect_broken(21229), grep_errmsg(r'SPEC') ], compile, ['-O -ddump-rules']) # Look for a specialisation rule for wimwam test('T19672', normal, compile, ['-O2 -ddump-rules']) |