[PATCH] D142305: [ADT] llvm::bit_cast - use __builtin_bit_cast if available
Sergei Barannikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 24 09:23:20 PST 2023
barannikov88 added a comment.
In D142305#4077361 <https://reviews.llvm.org/D142305#4077361>, @dblaikie wrote:
> Why? Maintaining non-portable code has some cost, if we can get similar/sufficient/the same performance without special casing, that seems better. Do we not get adequate performance with `std::memcpy`? Is the header especially expensive to include?
Half point is that `__builtin_bit_cast `can be used in constant expressions. "Half", because `llvm::bit_cast` is not constexpr :)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142305/new/
https://reviews.llvm.org/D142305
More information about the llvm-commits
mailing list