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

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 20 16:04:55 PDT 2022


arsenm added a comment.

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

> In D134308#3804305 <https://reviews.llvm.org/D134308#3804305>, @arsenm wrote:
>
>> In D134308#3804295 <https://reviews.llvm.org/D134308#3804295>, @jyknight wrote:
>>
>>> Can you explain what effect you expect this to have? It removes all the inttoptr -- maybe that's useful in itself?
>>
>> Moving towards the goal of never having compiler introduced inttoptr
>
> That was sort of my guess -- but, then, this change already DOES fix (this part of) the problem, right? We have a ptrtoint remaining, but not an inttoptr -- that should be fine?

It half fixes it. It's still introducing an inttoptr in order to get the low bits. We could introduce a second ptrmask with the inverted mask, but we still need to inttoptr in order to shift that into the Inv_Mask position


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

https://reviews.llvm.org/D134308



More information about the llvm-commits mailing list