[llvm] [Loads] Check loop-varying pointer in isDereferenceableAndAlignedInLoop. (PR #120962)
Johannes Doerfert via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 10 08:51:35 PST 2025
jdoerfert wrote:
> For dereferenceable on arguments, our current de-facto semantics are that the pointer must stay dereferenceable until the end of the function.
That is not true, at least not what we "agreed on" a long time ago. IIRC: Deref means deref at the spot (I mentioned it as part of this builtin as well: https://github.com/llvm/llvm-project/pull/120755#issuecomment-2573776216). I think we introduced `nofree` for this reason, basically arguments with deref + nofree => deref to the return. We also discussed deref of globals and other constructs in length, which are deref globally. I don't have the discussion thread but I immediately found what we never implemented: https://reviews.llvm.org/D61652
https://github.com/llvm/llvm-project/pull/120962
More information about the llvm-commits
mailing list