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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits