[llvm-branch-commits] [llvm] [LV] Mask off possibly aliasing vector lanes (PR #100579)
Benjamin Maxwell via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Dec 9 04:34:17 PST 2024
================
@@ -1416,14 +1466,14 @@ void VPlanTransforms::addActiveLaneMask(
auto *FoundWidenCanonicalIVUser =
find_if(Plan.getCanonicalIV()->users(),
[](VPUser *U) { return isa<VPWidenCanonicalIVRecipe>(U); });
- assert(FoundWidenCanonicalIVUser &&
+ assert(FoundWidenCanonicalIVUser && *FoundWidenCanonicalIVUser &&
----------------
MacDue wrote:
This looks a little odd. Doesn't `find_if` return an iterator?
```suggestion
auto IVUsers = Plan.getCanonicalIV()->users();
/// ...
assert(FoundWidenCanonicalIVUser != IVUsers.end() && "Must have widened canonical IV when tail folding!");
```
https://github.com/llvm/llvm-project/pull/100579
More information about the llvm-branch-commits
mailing list