aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis/Loads.cpp
diff options
context:
space:
mode:
authorMatt Arsenault <Matthew.Arsenault@amd.com>2022-09-20 08:53:25 -0400
committerMatt Arsenault <Matthew.Arsenault@amd.com>2022-09-20 09:25:18 -0400
commit1e1aefbf70007307b0a4a29400c4cd04ec1857ba (patch)
tree552bcd3918679b9a5d238ea48ce5957e3cd62dd4 /llvm/lib/Analysis/Loads.cpp
parent0015edeefd74ba331c328ddfb0ad32774ce90030 (diff)
downloadllvm-1e1aefbf70007307b0a4a29400c4cd04ec1857ba.zip
llvm-1e1aefbf70007307b0a4a29400c4cd04ec1857ba.tar.gz
llvm-1e1aefbf70007307b0a4a29400c4cd04ec1857ba.tar.bz2
Analysis: Pass AssumptionCache through isKnownNonZero
Pass this through now that isDereferenceableAndAlignedPointer has access to this.
Diffstat (limited to 'llvm/lib/Analysis/Loads.cpp')
-rw-r--r--llvm/lib/Analysis/Loads.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/Loads.cpp b/llvm/lib/Analysis/Loads.cpp
index f2fa9e0..a21649a 100644
--- a/llvm/lib/Analysis/Loads.cpp
+++ b/llvm/lib/Analysis/Loads.cpp
@@ -78,7 +78,7 @@ static bool isDereferenceableAndAlignedPointer(
CheckForFreed));
if (KnownDerefBytes.getBoolValue() && KnownDerefBytes.uge(Size) &&
!CheckForFreed)
- if (!CheckForNonNull || isKnownNonZero(V, DL, 0, nullptr, CtxI, DT)) {
+ if (!CheckForNonNull || isKnownNonZero(V, DL, 0, AC, CtxI, DT)) {
// As we recursed through GEPs to get here, we've incrementally checked
// that each step advanced by a multiple of the alignment. If our base is
// properly aligned, then the original offset accessed must also be.
@@ -169,7 +169,7 @@ static bool isDereferenceableAndAlignedPointer(
if (getObjectSize(V, ObjSize, DL, TLI, Opts)) {
APInt KnownDerefBytes(Size.getBitWidth(), ObjSize);
if (KnownDerefBytes.getBoolValue() && KnownDerefBytes.uge(Size) &&
- isKnownNonZero(V, DL, 0, nullptr, CtxI, DT) && !V->canBeFreed()) {
+ isKnownNonZero(V, DL, 0, AC, CtxI, DT) && !V->canBeFreed()) {
// As we recursed through GEPs to get here, we've incrementally
// checked that each step advanced by a multiple of the alignment. If
// our base is properly aligned, then the original offset accessed