[PATCH] D132330: [ADT] Simplify llvm::bit_cast (NFC)

Kazu Hirata via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 23 10:44:31 PDT 2022


kazu added inline comments.


================
Comment at: llvm/include/llvm/ADT/bit.h:34
   std::memcpy(&to, &from, sizeof(To));
   return to;
 }
----------------
RKSimon wrote:
> Could we use the __builtin_bit_cast if its available?
> Could we use the __builtin_bit_cast if its available?

We should be able to.  Would that lead to better code?



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132330/new/

https://reviews.llvm.org/D132330



More information about the llvm-commits mailing list