diff options
author | Ruiling, Song <ruiling.song@amd.com> | 2024-06-18 15:53:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 15:53:28 +0800 |
commit | a6eddf9a79709e3161d3aad86d44ab1097f57f22 (patch) | |
tree | 1e3217eea73acf546f64bb6ea031857470a1366e /llvm/lib/Analysis | |
parent | eacc3b3504be061f7334410dd0eb599688ba103a (diff) | |
download | llvm-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.cpp | 2 |
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); |