[PATCH] D150851: [LoopVectorize] Vectorize select-cmp reduction pattern for increasing integer induction variable
Mel Chen via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 4 01:41:40 PDT 2023
Mel-Chen marked an inline comment as done.
Mel-Chen added inline comments.
================
Comment at: llvm/test/Transforms/LoopVectorize/select-min-index.ll:89
+; CHECK-VF4IC1-NEXT: entry:
+; CHECK-VF4IC1-NEXT: br i1 true, label [[SCALAR_PH:%.*]], label [[VECTOR_PH:%.*]]
+; CHECK-VF4IC1: vector.ph:
----------------
Mel-Chen wrote:
> Ayal wrote:
> > This test now gets vectorized, being a `FindLast` loop that reports the last index where a[i] < a[i-1]+1, or zero if none are found. (I.e., proving that a sequence is not strictly increasing, rather than computing `MinLast`.)
> > But the vector loop is never reached?
> Impressive catch!
> We have been focusing only on the vector.body and ignoring the others. I will prioritize clarifying this bug and fixing it as soon as reasonable.
Clarified, it has been confirmed that this is not a bug.
The reason is that the loop trip count in the test case is 0, causing the simplification of `min.iters.check` to be `true`. The test case has been fixed in D154415.
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