This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug math/19974] optimize div() so the asm insn that calcs quotient and remainder is used when available
- From: "adhemerval.zanella at linaro dot org" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Wed, 20 Apr 2016 21:17:29 +0000
- Subject: [Bug math/19974] optimize div() so the asm insn that calcs quotient and remainder is used when available
- Auto-submitted: auto-generated
- References: <bug-19974-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=19974
--- Comment #6 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
The idea of implementing it as builtin in gcc is to not only allow writing code
with __builtin_div, but also make gcc understand 'div' as a operation it can
lower directly (as mostly target do with memset and memcpy when used with
defined constraints).
I would just avoid adding these kind of optimization in headers because
carrying such implementation adds complexity and burden maintainability. Also
if when gcc eventually supports it, it will be redundant.
--
You are receiving this mail because:
You are on the CC list for the bug.