[PATCH] D124571: Avoid strict aliasing violation on type punning inside llvm::PointerIntPair

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 24 01:34:14 PST 2023


nikic added a comment.

FYI this showed up as a compile-time regression: https://llvm-compile-time-tracker.com/compare.php?from=af694df712f28f419883e322d7dc978f04bfe38f&to=875391728c11339c8a6cd3338bcaa5ec0ffc2496&stat=instructions:u

Though not sure if avoidable. I initially thought we can store the data as `Ptr` and use `std::bit_cast` for conversion to/from integer, but I guess that wouldn't work if `Ptr` is not actually a pointer but some non-POD data type?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124571



More information about the llvm-commits mailing list