[llvm] [Loads] Pass DominatorTree if available (PR #95752)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 17 01:32:29 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-analysis
Author: Ruiling, Song (ruiling)
<details>
<summary>Changes</summary>
For better dominance check inside the function.
---
Full diff: https://github.com/llvm/llvm-project/pull/95752.diff
1 Files Affected:
- (modified) llvm/lib/Analysis/Loads.cpp (+1-1)
``````````diff
diff --git a/llvm/lib/Analysis/Loads.cpp b/llvm/lib/Analysis/Loads.cpp
index 478302d687b53..2b8197066e8e9 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);
``````````
</details>
https://github.com/llvm/llvm-project/pull/95752
More information about the llvm-commits
mailing list