[GHC] #13629: sqrt should use machine instruction on x86_64
GHC
ghc-devs at haskell.org
Sun Apr 30 00:19:41 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:
| Unknown/Multiple
Type of failure: Runtime | Test Case:
performance bug | numeric/num009
Blocked By: | Blocking:
Related Tickets: #13570 | Differential Rev(s): Phab:D3508
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by bgamari):
For the record, `sqrtf` is the following on my machine,
{{{#!asm
0x00007ffff78892c0 <+0>: pxor %xmm1,%xmm1
0x00007ffff78892c4 <+4>: ucomiss %xmm0,%xmm1
0x00007ffff78892c7 <+7>: ja 0x7ffff78892d0 <__sqrtf+16>
0x00007ffff78892c9 <+9>: sqrtss %xmm0,%xmm0
0x00007ffff78892cd <+13>: retq
0x00007ffff78892ce <+14>: xchg %ax,%ax
0x00007ffff78892d0 <+16>: mov 0x2cccf9(%rip),%rax #
0x7ffff7b55fd0
0x00007ffff78892d7 <+23>: cmpl $0xffffffff,(%rax)
0x00007ffff78892da <+26>: je 0x7ffff78892c9 <__sqrtf+9>
0x00007ffff78892dc <+28>: movaps %xmm0,%xmm1
0x00007ffff78892df <+31>: mov $0x7e,%edi
0x00007ffff78892e4 <+36>: jmpq 0x7ffff788ed50
<__kernel_standard_f>
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/13629#comment:19>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list