diff options
author | Florian Hahn <flo@fhahn.com> | 2020-04-18 10:19:04 +0100 |
---|---|---|
committer | Florian Hahn <flo@fhahn.com> | 2020-04-18 10:23:49 +0100 |
commit | 4ee45ab60f8639375296f8b7b96e2eb5e8a2c9d3 (patch) | |
tree | c61d288709011698a69d624b9694cc0354f5c827 /llvm/lib/Analysis/VectorUtils.cpp | |
parent | 239093f30c342bc8a3feec1536a3154e394e55ca (diff) | |
download | llvm-4ee45ab60f8639375296f8b7b96e2eb5e8a2c9d3.zip llvm-4ee45ab60f8639375296f8b7b96e2eb5e8a2c9d3.tar.gz llvm-4ee45ab60f8639375296f8b7b96e2eb5e8a2c9d3.tar.bz2 |
[LV] Invalidate cost model decisions along with interleave groups.
Cost-modeling decisions are tied to the compute interleave groups
(widening decisions, scalar and uniform values). When invalidating the
interleave groups, those decisions also need to be invalidated.
Otherwise there is a mis-match during VPlan construction.
VPWidenMemoryRecipes created initially are left around w/o converting them
into VPInterleave recipes. Such a conversion indeed should not take place,
and these gather/scatter recipes may in fact be right. The crux is leaving around
obsolete CM_Interleave (and dependent) markings of instructions along with
their costs, instead of recalculating decisions, costs, and recipes.
Alternatively to forcing a complete recompute later on, we could try
to selectively invalidate the decisions connected to the interleave
groups. But we would likely need to run the uniform/scalar value
detection parts again anyways and the extra complexity is probably not
worth it.
Fixes PR45572.
Reviewers: gilr, rengolin, Ayal, hsaito
Reviewed By: Ayal
Differential Revision: https://reviews.llvm.org/D78298
Diffstat (limited to 'llvm/lib/Analysis/VectorUtils.cpp')
-rw-r--r-- | llvm/lib/Analysis/VectorUtils.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/VectorUtils.cpp b/llvm/lib/Analysis/VectorUtils.cpp index 0d41148..7cbcb17 100644 --- a/llvm/lib/Analysis/VectorUtils.cpp +++ b/llvm/lib/Analysis/VectorUtils.cpp @@ -1243,6 +1243,8 @@ void InterleavedAccessInfo::invalidateGroupsRequiringScalarEpilogue() { if (Group->requiresScalarEpilogue()) DelSet.insert(Group); } + assert(!DelSet.empty() && "At least one group must be invalidated, as a " + "scalar epilogue was required"); for (auto *Ptr : DelSet) { LLVM_DEBUG( dbgs() |