[GHC] #13629: sqrt should use machine instruction on x86_64
GHC
ghc-devs at haskell.org
Fri Apr 28 16:21:12 UTC 2017
#13629: sqrt should use machine instruction on x86_64
-------------------------------------+-------------------------------------
Reporter: bgamari | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.4.1
Component: Compiler (NCG) | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: #13570 | Differential Rev(s): Phab:D3508
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by bgamari):
It's made in the native code generator, `genCCall` in
`compiler/nativeGen/X86/CodeGen.hs`. While we use the `fsin` instruction
on i386, we don't on x86_64 (and i386 with `-msse2`).
See Phab:D3508 for a quick attempt at fixing the `sqrt` situation. In the
case of trigonometric functions I'm afraid we have little choice but to
fall back on `libm` since SSE provides no trig instructions.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13629#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list