[llvm] AtomicExpand: Fix creating invalid ptrmask for fat pointers (PR #94955)
James Y Knight via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 10 08:48:05 PDT 2024
jyknight wrote:
> Right, this currently avoids a verifier error and in theory should work.
It's certainly clear that getIndexType is the correct type for ptrmask. So, this change is definitely "more correct" in that regards. But it's less clear to me (yet) that this code will actually work on architectures where there's a relevant difference.
> It’s written to the IR model that the address is in the low bits
Where is that in the LangRef?
I always thought it should be the case, but I don't see where it says that it is. The behavior of ptrmask is specified in terms of ptrtoint. And ptrtoint doesn't seem to say anything about the low-bits of the result representing the low-bits of the underlying address?
https://github.com/llvm/llvm-project/pull/94955
More information about the llvm-commits
mailing list