[PATCH] D64128: [CodeGen] Generate llvm.ptrmask instead of inttoptr(and(ptrtoint, C)) if possible.

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 6 17:10:26 PDT 2019


rjmccall added a comment.

I would be opposed to any addition of a `-f` flag for this absent any evidence that it's valuable for some actual C code; this patch appears to be purely speculative.  I certainly don't think we should be adding it default-on.  Your argument about alignment is what I was referring to when I mentioned that this is enforcing alignment restrictions in places we traditionally and intentionally haven't.

Note that it won't help Clang's major uses of `PointerIntPair` and `PointerUnion` because our traits say that types like `Decl` and `Type` have more alignment bits than their formal alignment would indicate, and `PointerIntPair` occupies alignment bits starting with the most significant.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64128





More information about the llvm-commits mailing list