[GHC] #14439: Remove redundant subtraction in (^) and stimes
GHC
ghc-devs at haskell.org
Wed Nov 22 02:47:58 UTC 2017
#14439: Remove redundant subtraction in (^) and stimes
-------------------------------------+-------------------------------------
Reporter: Bodigrim | Owner: (none)
Type: task | Status: patch
Priority: normal | Milestone:
Component: libraries/base | Version: 8.2.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4173
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"eb5a40cea6c64f5300c7697231cb0ede2c554388/ghc"
eb5a40ce/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="eb5a40cea6c64f5300c7697231cb0ede2c554388"
base: Remove redundant subtraction in (^) and stimes
Subtraction `y - 1` is redundant. The value of y is guaranteed to be
positive and odd, so
```
(y - 1) `quot` 2` = `y `quot` 2
```
Test Plan: validate
Reviewers: hvr, bgamari
Reviewed By: bgamari
Subscribers: rwbarton, thomie
GHC Trac Issues: #14439
Differential Revision: https://phabricator.haskell.org/D4173
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14439#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list