[PATCH] D134308: AtomicExpand: Use llvm.ptrmask instead of ptrtoint

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 22 09:20:13 PDT 2022


arsenm added a comment.

In D134308#3808841 <https://reviews.llvm.org/D134308#3808841>, @jyknight wrote:

> is incorrect. Sorry to be a pain, but do you have a link that describes the issues here? I may well not be remembering properly, but I had thought previous discussions and changes were about pointer provenance issues that arise from the inttoptr direction.

ptrtoint is the most basic capture <https://github.com/llvm/llvm-project/blob/4132bce9e56b00cdce8928e4ea67b136c93f46a2/llvm/lib/Analysis/CaptureTracking.cpp#L432>

> So I'm afraid I'm not at all clear to me why the ptrtoint is problematic -- and in particular, why you wrote in the change description that this might not actually be worth doing since we cannot remove the ptrtoint.

This does fully eliminate all ptrtoint in the overaligned case. I'd still rather move towards reducing uses of it to the point where it's required (which moves it to the shift)


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

https://reviews.llvm.org/D134308



More information about the llvm-commits mailing list