[PATCH] D149291: GlobalOpt: Drop code for handling pointer bitcasts

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 29 13:05:39 PDT 2023


arsenm added a comment.

In D149291#4307575 <https://reviews.llvm.org/D149291#4307575>, @nikic wrote:

> Won't this also remove the ability to look through addrspacecasts?

Yes, but I'm not entirely sure that's a bad thing. We're certainly missing test coverage for this.

If we have a null pointer in addrspace(0), cast to a non-0 address space pointer and accessed, can we assume it would trap? My interpretation of the LangRef is ptr addrspace(0) null cannot be addrspacecasted to produce a dereferenceable result so this would be OK (so long as it's not a volatile access)


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

https://reviews.llvm.org/D149291



More information about the llvm-commits mailing list