[llvm] [Analysis] Teach ScalarEvolution::getRangeRef about more dereferenceable objects (PR #104778)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 21 05:17:24 PDT 2024
================
@@ -909,7 +909,7 @@ uint64_t Value::getPointerDereferenceableBytes(const DataLayout &DL,
if (!AI->isArrayAllocation()) {
DerefBytes =
DL.getTypeStoreSize(AI->getAllocatedType()).getKnownMinValue();
- CanBeNull = false;
+ CanBeNull = AI->getType()->getPointerAddressSpace() != 0;
----------------
david-arm wrote:
Fair enough and thanks for explaining the subtle distinction! I've reverted the changes.
https://github.com/llvm/llvm-project/pull/104778
More information about the llvm-commits
mailing list