diff options
author | Joachim Breitner <mail@joachim-breitner.de> | 2018-04-09 14:54:06 -0400 |
---|---|---|
committer | Joachim Breitner <mail@joachim-breitner.de> | 2018-04-09 15:06:08 -0400 |
commit | dbbda65ba43670eb9d17c28b635c646c9ee4def7 (patch) | |
tree | 17f365915392a178a9d5853229a95b0a502903a6 | |
parent | ca0f44357fc5172ea61fd55e49f03e691b891a15 (diff) | |
download | haskell-dbbda65ba43670eb9d17c28b635c646c9ee4def7.tar.gz |
Fix #15002 more carefully
`noCSE` checks a bunch of conditions, and adding that check to all
branches of `cseBind` causes regressions. So, to understand the
situation better, let’s just check `isJoinId` and see if that fixes the
bug without causing regressions.
Maybe `noCSE` is only about what should be added to the the CSEnv, and
the question of “which RHSs” should be CSEd needs to be answered
differently.
-rw-r--r-- | compiler/simplCore/CSE.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/simplCore/CSE.hs b/compiler/simplCore/CSE.hs index 6bdf4f036d..865ab6a852 100644 --- a/compiler/simplCore/CSE.hs +++ b/compiler/simplCore/CSE.hs @@ -370,7 +370,7 @@ cse_bind toplevel env (in_id, in_rhs) out_id -- See Note [Take care with literal strings] = (env', (out_id, in_rhs)) - | noCSE in_id + | isJoinId in_id = (env', (out_id, in_rhs)) | otherwise |