[PATCH] D150851: [LoopVectorize] Vectorize select-cmp reduction pattern for increasing integer induction variable

Ramkumar Ramachandra via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 24 06:42:16 PDT 2023


artagnon added a comment.

In D150851#4523028 <https://reviews.llvm.org/D150851#4523028>, @artagnon wrote:

> May I suggest using the logic outlined in `isInductionMinMaxPattern` in D152693 <https://reviews.llvm.org/D152693>?

It's not that simple, as you'd lose the information about `hasNoSignedWrap` from the `AR` of the `trunc`. I've also been playing with attempting to extend this patch to the decreasing IV case, and it seems we've painted ourselves into a corner by being more concerned about the codegen performance than the generality of the patch: the constant IV start is a serious limitation when looking at the decreasing IV case. I think other reviewers like @fhahn and @Ayal have also expressed interest in greater generality (perhaps at the cost of codegen performance).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D150851/new/

https://reviews.llvm.org/D150851



More information about the llvm-commits mailing list