Insert the select op before the combiner op when vectorizing a
reduction loop that needs a mask, so the vectorized reduction loop
can pass isLoopParallel check and be transformed correctly in later
passes.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Thanks, Amy! In general, moving the select op before the operation makes more sense to me since the op might have side effects that would make the execution incorrect otherwise.
I hope we can replace all of this once we have the masking proposal in place.
mlir/lib/Dialect/Affine/Transforms/SuperVectorize.cpp | ||
---|---|---|
1446 | I'm wondering if the matchReduction utility in SliceAnalysis.h could simplify part of this code. Would you mind giving it a try? |
Comment Actions
@dcaballe Thank you for the review. I'll merge it tomorrow if there are no more comments.
I'm wondering if the matchReduction utility in SliceAnalysis.h could simplify part of this code. Would you mind giving it a try?