[llvm] [AssumeBundles] Dereferenceable used in bundle only applies at assume. (PR #126117)
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 11 10:05:30 PST 2025
================
@@ -1474,7 +1474,11 @@ Currently, only the following parameter attributes are defined:
``null_pointer_is_valid`` function attribute is present.
``n`` should be a positive number. The pointer should be well defined,
otherwise it is undefined behavior. This means ``dereferenceable(<n>)``
- implies ``noundef``.
+ implies ``noundef``. When ``dereferenceable(<n>)`` is used in an
+ :ref:`assume operand bundls <assume_opbundles>`, the pointer is only
+ guaranteed to be dereferenceable at the point of the assumption and
+ may not be dereferenceable at later pointers, e.g. because it could have
+ been freed.
----------------
preames wrote:
SGTM
https://github.com/llvm/llvm-project/pull/126117
More information about the llvm-commits
mailing list