Simon Peyton Jones pushed to branch wip/T23109a at Glasgow Haskell Compiler / GHC
Commits:
-
1dd04c7f
by Simon Peyton Jones at 2025-05-26T17:33:30+01:00
1 changed file:
Changes:
... | ... | @@ -3923,9 +3923,12 @@ mkDupableContWithDmds env df dmds |
3923 | 3923 | -- it, then postInlineUnconditionally will just inline it again, perhaps
|
3924 | 3924 | -- taking an extra Simplifier iteration (e.g. in test T21839c). So make
|
3925 | 3925 | -- a `let` only if `couldBeSmallEnoughToInline` says that it is big enough
|
3926 | + -- NB: postInlineUnconditionally does not fire on strict demands,
|
|
3927 | + -- so account for that too
|
|
3926 | 3928 | ; let uf_opts = seUnfoldingOpts env
|
3927 | 3929 | ; (let_floats2, arg'')
|
3928 | - <- if couldBeSmallEnoughToInline uf_opts (unfoldingUseThreshold uf_opts) arg'
|
|
3930 | + <- if not (isStrUsedDmd dmd) &&
|
|
3931 | + couldBeSmallEnoughToInline uf_opts (unfoldingUseThreshold uf_opts) arg'
|
|
3929 | 3932 | then return (emptyLetFloats, arg')
|
3930 | 3933 | else makeTrivial env NotTopLevel dmd (fsLit "karg") arg'
|
3931 | 3934 |