summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDecl.cpp
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2012-01-05 02:13:20 +0000
committerBill Wendling <isanbard@gmail.com>2012-01-05 02:13:20 +0000
commitac27f0c83018f4f71059ad16a57d6686f7563ae8 (patch)
treecfd8f435b5a6731f71d492bf3d1d607cadba70f0 /clang/lib/Sema/SemaDecl.cpp
parentc1b312a5c3aa062d9ccf2a548b79163e003404e0 (diff)
downloadbcm5719-llvm-ac27f0c83018f4f71059ad16a57d6686f7563ae8.tar.gz
bcm5719-llvm-ac27f0c83018f4f71059ad16a57d6686f7563ae8.zip
Replace the uint64_t -> double convertion algorithm with one that's more efficient.
This small bit of ASM code is sufficient to do what the old algorithm did: movq %rax, %xmm0 punpckldq (c0), %xmm0 // c0: (uint4){ 0x43300000U, 0x45300000U, 0U, 0U } subpd (c1), %xmm0 // c1: (double2){ 0x1.0p52, 0x1.0p52 * 0x1.0p32 } #ifdef __SSE3__ haddpd %xmm0, %xmm0 #else pshufd $0x4e, %xmm0, %xmm1 addpd %xmm1, %xmm0 #endif It's arguably faster. One caveat, the 'haddpd' instruction isn't very fast on all processors. <rdar://problem/7719814> llvm-svn: 147593
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud