[llvm-commits] Patch: x86 multiply v2i64

Mon Ping Wang monping at apple.com
Wed Dec 17 20:06:20 PST 2008


Hi Eli,

On Dec 17, 2008, at 7:16 PM, Eli Friedman wrote:

> On Wed, Dec 17, 2008 at 6:37 PM, Mon Ping Wang <monping at apple.com>  
> wrote:
>> Hi,
>>
>> This is a patch to fix multiply of v2i64.  Today, on SSE4.1, we map a
>> multiply of v2i64 to pmuldq which does two 32 bit multiples that  
>> generates
>> two 64 bit results, which is incorrect.  This patch removes that
>
> Did you forget to include a file in your patch?
>

I should have included the changes to lib/Target/X86/X86InstrSSE.td  
that no longer maps a mul to pmuldq.  This is included in the updated  
patch.

>> and instead
>> lowers it to set of vector code that works for SSE2+.  Please let  
>> me know if
>> you have any comments.
>
> On x86-64, would we prefer to scalarize this?  Other than that,  
> looks fine.
>

On X86-64 with SSE4.1, it is pretty much a wash in terms of  
instruction count.  It should be a win in the other cases.

Thanks,
  -- Mon PIng

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mulv2i16.patch
Type: application/octet-stream
Size: 6335 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20081217/b653fadc/attachment.obj>
-------------- next part --------------


> -Eli
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits



More information about the llvm-commits mailing list