[GHC] #9251: ghc does not expose branchless max/min operations as primops

GHC ghc-devs at haskell.org
Sun Jul 6 19:18:35 UTC 2014


#9251: ghc does not expose branchless max/min operations as primops
-------------------------------------+------------------------------------
        Reporter:  carter            |            Owner:  carter
            Type:  task              |           Status:  new
        Priority:  normal            |        Milestone:  7.10.1
       Component:  Compiler          |          Version:  7.8.2
      Resolution:                    |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:  #9246
-------------------------------------+------------------------------------

Comment (by carter):

 i'm working on that stuff, fret not!

 There's going to be a IEEE *must* conformance compliant version of every
 operation, plus a possibly system dependent one.

 It looks like IEEE actually specifies TWO versions of min and max.

 I've got a local copy of IEEE-754-2008 downloaded after I googled around,
 I'll spec out the operations later this week.

 Wrt the sign of 0 bit,  it says `**may** always return the first argument`
 rather than **must**. Point being, the primops layer will likely have more
 than 1 variant, and the Num / Ord instances will have some choice of IEEE
 **must** condition + H2010 satisfying definition

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


More information about the ghc-tickets mailing list