[PATCH] D125301: [LoopVectorize] Add option to use active lane mask for loop control flow
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 25 08:22:21 PDT 2022
david-arm marked 8 inline comments as done.
david-arm added a comment.
Hi @dmgreen, thanks for the explanation! The reason for doing this in LoopVectorize.cpp is because it feels much more natural to express it this way than writing a complicated pass just before lowering to transform it afterwards. There is no guarantee that such a transform would even succeed if subsequent passes change aspects of the loop. I believe this is actually the way it's done in GCC as well. From a performance perspective I've not observed any degradations in code quality or performance so far with this approach.
I think that in general LLVM is moving towards supporting predication in IR and this patch is aligned with that. You're right that it's possible we may occasionally have work to do in future looking for backedge counts, but I don't feel we should be afraid of that. The information is there if we need it, since it's inferred from the trip count passed to the active lane mask intrinsic.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125301/new/
https://reviews.llvm.org/D125301
More information about the llvm-commits
mailing list