[libcxx-commits] [PATCH] D134363: [libc++] Avoid relying on non-portable behaviour in std::align

Alexander Richardson via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Sep 22 02:26:30 PDT 2022


arichardson added a comment.

In D134363#3806644 <https://reviews.llvm.org/D134363#3806644>, @philnik wrote:

> Is there any benefit of the builtin other than removing `reinterpret_cast`? If not I'd say just drop it, since we have to keep the `reinterpret_cast`s anyways.

Not really - in theory it could improve codegen, it just emits the same thing as the hand-written code anyway. I think the main reason I originally used it is that CHERI emitted a (false-positive) warning on the arithmetic expression back in 2019 that has since been fixed. I've dropped the builtin from this version.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134363



More information about the libcxx-commits mailing list