[GHC] #9340: Implement new `clz` inline primop

GHC ghc-devs at haskell.org
Sun Aug 31 14:28:00 UTC 2014


#9340: Implement new `clz` inline primop
-------------------------------------+-------------------------------------
              Reporter:  hvr         |            Owner:  hvr
                  Type:  feature     |           Status:  closed
  request                            |        Milestone:  7.10.1
              Priority:  normal      |          Version:  7.8.2
             Component:  Compiler    |         Keywords:  primop clz ctz
  (CodeGen)                          |     Architecture:  Unknown/Multiple
            Resolution:  fixed       |       Difficulty:  Unknown
      Operating System:              |       Blocked By:
  Unknown/Multiple                   |  Related Tickets:  #9532
       Type of failure:              |
  None/Unknown                       |
             Test Case:              |
              Blocking:              |
Differential Revisions:  Phab:D144   |
-------------------------------------+-------------------------------------

Comment (by Herbert Valerio Riedel <hvr@…>):

 In [changeset:"a8a969ae7a05e408b29961d0a2ea621a16d73d3e/ghc"]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="a8a969ae7a05e408b29961d0a2ea621a16d73d3e"
 Add `FiniteBits(count{Leading,Trailing}Zeros)`

 This exposes the newly added CLZ/CTZ primops from
 e0c1767d0ea8d12e0a4badf43682a08784e379c6 (re #9340)
 via two new methods `countLeadingZeros` and `countTrailingZeros`
 in the `Data.Bits.FiniteBits` class.

 The original proposal can be found at

   http://www.haskell.org/pipermail/libraries/2014-August/023567.html

 Test Plan: successful validate

 Reviewers: ekmett, tibbe

 GHC Trac Issues: #9532

 Differential Revision: https://phabricator.haskell.org/D158
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9340#comment:10>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list