[Webkit-unassigned] [Bug 73182] Need SSE optimization for functions vfmul and vadd

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 28 16:06:04 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=73182





--- Comment #4 from Wei James <james.wei at intel.com>  2011-11-28 16:06:03 PST ---
(In reply to comment #3)
> Thanks for your patch.  This looks good, except a few items.
> 
> First, there are a few style issues that need to be fixed.  (I can fix those.)
> 
> Second, in vsmul, you have an if statement inside while loop.  Can the if statements be lifted out so you get something like:
> 
>  if (((size_t)destP & 0x0F) != 0) {
>     while (group--) {
>       dest = _mm_mul_ps(*pSource, scale_);
>       _mm_storeu_ps(destP, dest);
>       sourceP += 4;
>       destP += 4;
>     }
>   } else {
>     while (group--) {
>       pDest = reinterpret_cast<__m128*>(destP);
>       *pDest = _mm_mul_ps(*pSource, scale_);
>       sourceP += 4;
>       destP += 4;
>     }
>   }
> 
> Same comment about the while/if in vadd, although that's a bit more complicated since source2P and destP may or may not be aligned.

Raymond, thanks for your comment. 

For the if statement inside while loop, we have thought of it and tested the performance of lifting the if statement out and found the performance difference is minor and the source code is much more complicated. So we decided to leave it be. 

Do you think it is necessary to lift it out? thanks

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list