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

Breno Rodrigues Guimaraes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 24 04:51:20 PST 2023


brenoguim added a comment.

The initial idea was to make `Data` a `Ptr` ( see https://reviews.llvm.org/D124571?id=425939 ) but that triggered an issue (the godbolt link there in the comment is broken): https://reviews.llvm.org/D124571#3487131
With that "better" implementation, clang <=13 miscompiles another piece of code inside llvm: https://godbolt.org/z/TG9KoxEev so I could not use it.

If the minimum version of clang to build LLVM/clang is 14+, then we can go with the former implementation and see if it improves.
Otherwise, that is the only way I got both the unit test and llvm build with clang13 to work.


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