diff options
| author | Ben Gamari <bgamari.foss@gmail.com> | 2017-09-04 08:05:33 -0400 |
|---|---|---|
| committer | Ben Gamari <ben@smart-cactus.org> | 2017-09-05 07:20:00 -0400 |
| commit | cd857dd415378ac4204a164407d350b0c3ede5ae (patch) | |
| tree | 4e5a03182edab47fee93cd5c8f2a692284769fc8 | |
| parent | 542f89ff23e4deb66debca0b5de3ac3047befb28 (diff) | |
| download | haskell-cd857dd415378ac4204a164407d350b0c3ede5ae.tar.gz | |
SetLevels: Substitute in ticks in lvlMFE
Previously SetLevels.lvlMFE would fail to substitute in ticks, unlike
lvlExpr. This lead to #13481. Fix this.
Test Plan: `make test TEST=T12622 WAY=ghci`
Reviewers: austin, simonpj
Reviewed By: simonpj
Subscribers: simonpj, rwbarton, thomie
GHC Trac Issues: #13481
Differential Revision: https://phabricator.haskell.org/D3920
| -rw-r--r-- | compiler/simplCore/SetLevels.hs | 3 | ||||
| -rw-r--r-- | testsuite/tests/codeGen/should_run/all.T | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/compiler/simplCore/SetLevels.hs b/compiler/simplCore/SetLevels.hs index 57b1671fa1..f6077dc39f 100644 --- a/compiler/simplCore/SetLevels.hs +++ b/compiler/simplCore/SetLevels.hs @@ -558,7 +558,8 @@ lvlMFE env _ (_, AnnType ty) -- and then inline lvl. Better just to float out the payload. lvlMFE env strict_ctxt (_, AnnTick t e) = do { e' <- lvlMFE env strict_ctxt e - ; return (Tick t e') } + ; let t' = substTickish (le_subst env) t + ; return (Tick t' e') } lvlMFE env strict_ctxt (_, AnnCast e (_, co)) = do { e' <- lvlMFE env strict_ctxt e diff --git a/testsuite/tests/codeGen/should_run/all.T b/testsuite/tests/codeGen/should_run/all.T index 6318341abb..271a42036d 100644 --- a/testsuite/tests/codeGen/should_run/all.T +++ b/testsuite/tests/codeGen/should_run/all.T @@ -148,7 +148,7 @@ test('PopCnt', omit_ways(['ghci']), multi_compile_and_run, ['PopCnt', [('PopCnt_cmm.cmm', '')], '']) test('T12059', normal, compile_and_run, ['']) test('T12433', normal, compile_and_run, ['']) -test('T12622', expect_broken_for(13481, ['ghci']), multimod_compile_and_run, ['T12622', '-O']) +test('T12622', normal, multimod_compile_and_run, ['T12622', '-O']) test('T12757', normal, compile_and_run, ['']) test('T12855', normal, compile_and_run, ['']) test('T9577', [ unless(arch('x86_64') or arch('i386'),skip), |
