[PATCH] D114533: LLVM IR should allow bitcast between address spaces with the same size.

Matt Arsenault via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 24 07:15:21 PST 2021


arsenm added a comment.

In D114533#3151482 <https://reviews.llvm.org/D114533#3151482>, @lebedev.ri wrote:

> In D114533#3151423 <https://reviews.llvm.org/D114533#3151423>, @arsenm wrote:
>
>> Patch description should include this avoids a need to introduce ptrtoint/inttoptr pairs
>
> That is a good point, but all the motivational cases seem to be about chaining the address space of the pointee pointer.
> Does this come up for changing the address space of the pointer itself? I'm just wondering if this is still relevant with opaque pointers.

Nothing about address spaces changes with opaque pointers. The address space is a property of the pointer itself, not the memory it points to. This is for dealing with cases where we end up with a bit reinterpret of a pointer in another address space, and need to do a true no-op cast to convert them.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114533



More information about the cfe-commits mailing list