This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug math/19974] optimize div() so the asm insn that calcs quotient and remainder is used when available


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]