[llvm] [LoopVectorizer] Allow partial reductions to be made in predicated loops (PR #124268)

Benjamin Maxwell via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 09:13:47 PST 2025


https://github.com/MacDue approved this pull request.

I think the approach generally LGTM, though I'm inclined to say the extra epilogue vectorization should be removed, as they massively increase the diff (making it much harder to see the actual change). I think the original motivation for adding them has been removed from the PR (the `clone()` function). cc @fhahn 

If we do need some more tests I think it's best to reduce them down to checking only the relevant parts, to make them smaller and easier to understand. E.g. In this case, what you wanted to check is that the partial reduction in the `epilog.vector.body` has its inputs masked like the one in `vector.body` (with that we know the `clone()` function worked).

https://github.com/llvm/llvm-project/pull/124268


More information about the llvm-commits mailing list