[GHC] #10750: silly assembly for comparing Doubles
GHC
ghc-devs at haskell.org
Sun Aug 9 07:59:50 UTC 2015
#10750: silly assembly for comparing Doubles
-------------------------------------+-------------------------------------
Reporter: rwbarton | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.11
(CodeGen) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: #10137, #10677 | Differential Revisions:
-------------------------------------+-------------------------------------
Comment (by nomeata):
Weird. With your example, compiled with `./inplace/bin/ghc-stage2
-fforce-recomp -O -ddump-asm T10677.hs`, I get assembly like this:
{{{
==================== Asm code ====================
.text
.align 8
.long S1vB_srt-(Zero.f_info)+0
.long 0
.quad 4294967301
.quad 0
.quad 12884901903
.globl Zero.f_info
.type Zero.f_info, @object
Zero.f_info:
_c1vs:
leaq -32(%rbp),%rax
cmpq %r15,%rax
jb _c1vt
_c1vu:
movq $block_c1vm_info,-8(%rbp)
movq %r14,%rax
movl $GHC.Classes.$fOrdDouble_closure,%r14d
movq $stg_ap_pp_info,-32(%rbp)
movq %rax,-24(%rbp)
movq $Zero.f3_closure+1,-16(%rbp)
addq $-32,%rbp
jmp GHC.Classes.>_info
.text
.align 8
.quad 0
.quad 32
block_c1vm_info:
_c1vm:
andl $7,%ebx
cmpq $1,%rbx
jne _c1vq
_c1vp:
movl $Zero.f2_closure+1,%ebx
addq $8,%rbp
jmp *(%rbp)
_c1vq:
movl $Zero.f1_closure+1,%ebx
addq $8,%rbp
jmp *(%rbp)
_c1vt:
movl $Zero.f_closure,%ebx
jmp *-8(%r13)
.size Zero.f_info, .-Zero.f_info
}}}
so unless I am reading this wrong, it did not inline specialize or `>`.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10750#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list