[libc-commits] [PATCH] D117584: [libc] Specialize portion of hypot for x86_64 CPUs.
Clint Caywood via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Jan 18 11:38:54 PST 2022
cratonica added inline comments.
Comment at: libc/src/__support/find_leading_one.h:26
> Is the BSR instruction available for x86 also? If so then I think LLVM_LIBC_ARCH_X86 should be better. And if that's the case, you can just leave the implementation in the x86_64 folder, I don't think we need separate folders for x86 and x86-64.
My understanding is that we'd be limited to 32-bit operands in that case and would therefore need to make this conditional upon both the size of the data and the architecture, which might be messier (so, x86 would drop back to the generic implementation for 64-bit numbers, or I suppose I could implement it as two BSR calls if it's possible to test this in 32-bit mode).
Happy to do whatever you think is best.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the libc-commits