[llvm-commits] Patch: compiler-rt/lib/divsi3.c: do not call udivsi3 directly

Alexey Samsonov samsonov at google.com
Fri Jun 22 00:45:28 PDT 2012


+llvm-commits, asl, ddunbar

Hi, Sebastien!

The patch doesn't seem that obvious at first glance -
does your assumption about the compiler behavior always hold? (if yes,
please add
an explicit comment about it) Also, I'm not the author of the core
compiler-rt lib and
don't know if optional hardware support is desirable here.


>
> -------- Original Message --------
> Subject: Patch: compiler-rt/lib/divsi3.c: do not call udivsi3 directly
> Date: Thu, 07 Jun 2012 00:07:10 +0200
> From: Sébastien Bourdeauducq <sebastien.bourdeauducq@**lekernel.net<sebastien.bourdeauducq at lekernel.net>
> >
> To: eocallaghan at auroraux.org, hhinnant at apple.com, daniel at zuster.org
>
> Hi,
>
> The attached patch uses the "/" operator in divsi3 instead of calling
> udivsi3 directly. This way, CPUs that have hardware support for unsigned
> division do not need to use the slow software emulation. The compiler
> will still generate an udivsi3 call for CPUs which lack hardware
> unsigned division.
>
> Please apply.
>
> Thanks,
> Sébastien
>
>
>
-- 
Alexey Samsonov, MSK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120622/c7111415/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: divsi3-no-udivsi.diff
Type: text/x-patch
Size: 718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120622/c7111415/attachment.bin>


More information about the llvm-commits mailing list