[PATCH] D154415: [LV] Change the test cases to ensure that the trip count is not zero. (NFC)

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 22:14:40 PDT 2023


Ayal added inline comments.


================
Comment at: llvm/test/Transforms/LoopVectorize/select-min-index.ll:23
   %min.idx.next = select i1 %cmp, i64 %iv, i64 %min.idx
   %iv.next = add nuw nsw i64 %iv, 1
+  %exitcond.not = icmp eq i64 %iv.next, %n
----------------
Note that checking if %iv.next is zero after bumping it with no-wrap flags (having initialized it to zero) is undefined. As is the case now if %n is zero.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154415



More information about the llvm-commits mailing list