[PATCH] D104547: [langref] attempt to clarify semantics of inttoptr/ptrtoint for non-integral types

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 28 22:48:12 PDT 2021


jdoerfert added inline comments.


================
Comment at: llvm/docs/LangRef.rst:626
+challenging as many commonly expected properties, such as
+``ptrtoint(v)-ptrtoint(v) == 0``, don't hold for non-integral types.  
 
----------------
Drive by: It states here that we should not introduce new p2i casts, which I think we should avoid in general. That said, the reality is (or at least was) that we introduce p2i casts in some situations. Are we planning to introduce checks on the pointer "kind" or eliminate the introduction of those casts?


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

https://reviews.llvm.org/D104547



More information about the llvm-commits mailing list