[GHC] #2253: Native code generator could do better
GHC
trac at galois.com
Fri Dec 18 13:36:53 EST 2009
#2253: Native code generator could do better
--------------------------------------+-------------------------------------
Reporter: dons | Owner:
Type: bug | Status: new
Priority: normal | Milestone: 6.12 branch
Component: Compiler (NCG) | Version: 6.8.2
Resolution: | Keywords:
Difficulty: Unknown | Os: Unknown/Multiple
Testcase: | Architecture: Unknown/Multiple
Failure: Runtime performance bug |
--------------------------------------+-------------------------------------
Changes (by morrow):
* cc: morrow at moonpatio.com (added)
Comment:
Replying to [comment:1 dons]:
> == Program 6 ==
{{{
..
let c = replicateU n (2::Double)
..
}}}
> Native backend:
{{{
..
mulsd .LnZP(%rip),%xmm0 /*.LnZP==2.0*/
addsd %xmm0,%xmm5
..
}}}
> C backend:
{{{
..
addsd %xmm0, %xmm0
addsd %xmm0, %xmm5
..
}}}
Also, gcc is strength-reducing (2.0 * x) to (x + x).
{{{
MULSD mem64,xmmreg ==> latency=6
ADDSD xmmreg2,xmmreg1 ==> latency=4
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2253#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list