[commit: ghc] master: SetLevels: Substitute in ticks in lvlMFE (cd857dd)
git at git.haskell.org
git at git.haskell.org
Tue Sep 5 11:22:22 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/cd857dd415378ac4204a164407d350b0c3ede5ae/ghc
>---------------------------------------------------------------
commit cd857dd415378ac4204a164407d350b0c3ede5ae
Author: Ben Gamari <bgamari.foss at gmail.com>
Date: Mon Sep 4 08:05:33 2017 -0400
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
>---------------------------------------------------------------
cd857dd415378ac4204a164407d350b0c3ede5ae
compiler/simplCore/SetLevels.hs | 3 ++-
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 57b1671..f6077dc 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 6318341..271a420 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),
More information about the ghc-commits
mailing list