diff options
author | Sebastian Graf <sebastian.graf@kit.edu> | 2018-05-15 13:12:56 -0400 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2018-05-15 13:12:57 -0400 |
commit | bb338f2eb706a3137bf6675e3ddbf96d4fe4f4aa (patch) | |
tree | d45b57439ca4d1d8dc0a7e820acd8366b11135c7 /packages | |
parent | 01b15b88639443bec12415b6b0d906261bd6c047 (diff) | |
download | haskell-bb338f2eb706a3137bf6675e3ddbf96d4fe4f4aa.tar.gz |
Algebraically simplify add/sub with carry/overflow
Previously, the `{add,sub}{Int,Word}C#` PrimOps weren't handled
in PrelRules (constant folding and algebraic simplification) at all.
This implements the necessary logic, so that using these primitives
isn't too punishing compared to their well-optimised, overflow-unaware
counterparts.
This is so that using these primitives in `enumFromThenTo @Int` can
be optimized by constant folding, reducing closure sizes.
Reviewers: bgamari, simonpj, hsyl20
Reviewed By: bgamari, simonpj
Subscribers: AndreasK, thomie, carter
GHC Trac Issues: #8763
Differential Revision: https://phabricator.haskell.org/D4605
Diffstat (limited to 'packages')
0 files changed, 0 insertions, 0 deletions