[llvm] [LVI] Fix the type when inferring nonnull from a dereferenceable attribute bundle (PR #177562)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 23 02:22:19 PST 2026


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-analysis

Author: Nikolas Klauser (philnik777)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/177562.diff


1 Files Affected:

- (modified) llvm/lib/Analysis/LazyValueInfo.cpp (+1-1) 


``````````diff
diff --git a/llvm/lib/Analysis/LazyValueInfo.cpp b/llvm/lib/Analysis/LazyValueInfo.cpp
index 0bdd158970dc7..b4d64536a5aca 100644
--- a/llvm/lib/Analysis/LazyValueInfo.cpp
+++ b/llvm/lib/Analysis/LazyValueInfo.cpp
@@ -854,7 +854,7 @@ void LazyValueInfoImpl::intersectAssumeOrGuardBlockValueConstantRange(
           if (auto *CI = dyn_cast<ConstantInt>(RK.IRArgValue);
               CI && !CI->isZero())
             BBLV = BBLV.intersect(ValueLatticeElement::getNot(
-                Constant::getNullValue(RK.IRArgValue->getType())));
+                Constant::getNullValue(RK.WasOn->getType())));
           break;
 
         default:

``````````

</details>


https://github.com/llvm/llvm-project/pull/177562


More information about the llvm-commits mailing list