[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 08:02:31 PDT 2022


arsenm added a comment.

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

> So, ISTM this patch does entirely fix the problem it sets out to fix -- it has removed the only CreateIntToPtr from the address computation. There remains a CreatePtrToInt to extract the value shift/mask -- but that's not a problem. Right?

We don't want inttoptr or ptrtoint anywhere, since they still are capturing, but this is the limit of what is possible with current IR. We could push one of the ptrtoints later after doing the mask to get the LSB with the intrinsic, but you still need the ptrtoint to do 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