aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
authorRuiling, Song <ruiling.song@amd.com>2024-06-18 15:53:28 +0800
committerGitHub <noreply@github.com>2024-06-18 15:53:28 +0800
commita6eddf9a79709e3161d3aad86d44ab1097f57f22 (patch)
tree1e3217eea73acf546f64bb6ea031857470a1366e /llvm/lib/Analysis
parenteacc3b3504be061f7334410dd0eb599688ba103a (diff)
downloadllvm-a6eddf9a79709e3161d3aad86d44ab1097f57f22.zip
llvm-a6eddf9a79709e3161d3aad86d44ab1097f57f22.tar.gz
llvm-a6eddf9a79709e3161d3aad86d44ab1097f57f22.tar.bz2
[Loads] Pass DominatorTree if available (#95752)
For better dominance check inside the function.
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/Loads.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/Loads.cpp b/llvm/lib/Analysis/Loads.cpp
index 478302d..2b81970 100644
--- a/llvm/lib/Analysis/Loads.cpp
+++ b/llvm/lib/Analysis/Loads.cpp
@@ -165,7 +165,7 @@ static bool isDereferenceableAndAlignedPointer(
if (getKnowledgeForValue(
V, {Attribute::Dereferenceable, Attribute::Alignment}, AC,
[&](RetainedKnowledge RK, Instruction *Assume, auto) {
- if (!isValidAssumeForContext(Assume, CtxI))
+ if (!isValidAssumeForContext(Assume, CtxI, DT))
return false;
if (RK.AttrKind == Attribute::Alignment)
AlignRK = std::max(AlignRK, RK);