[PATCH] D81938: [InferAddressSpaces] Handle the pair of `ptrtoint`/`inttoptr`.
Michael Liao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 16 14:19:13 PDT 2020
hliao added a comment.
In D81938#2096500 <https://reviews.llvm.org/D81938#2096500>, @arsenm wrote:
> I'm not entirely convinced this is safe in all contexts. I think you can argue that this is safe if it directly feeds a memory instruction, as the access would be undefined if it weren't valid to do the no-op cast. However, I'm not sure if this is safe if used purely in arithmetic contexts. If you're just comparing the reinterpreted pointer values for example, I don't think that would be undefined
Would it be safe if we double-check the target hook and ensure that's a no-op `addrspacecast` between address spaces?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D81938/new/
https://reviews.llvm.org/D81938
More information about the llvm-commits
mailing list