[PATCH] D71499: Add builtins for aligning and checking alignment of pointers and integers

Alexander Richardson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 1 14:57:59 PST 2020


arichardson marked an inline comment as done.
arichardson added inline comments.


================
Comment at: clang/lib/CodeGen/CGBuiltin.cpp:14322
+  if (SrcForMask->getType()->isPointerTy()) {
+    /// TODO: Use ptrmask instead of ptrtoint/inttoptr
+    // Result = Builder.CreateIntrinsic(
----------------
lebedev.ri wrote:
> Until we are there, can we still emit sane IR, without `inttoptr`?
> https://godbolt.org/z/atBtSx
It seems like avoiding the select might be better?
https://godbolt.org/z/UdPjZk

I've done that in the current version.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71499





More information about the cfe-commits mailing list