[PATCH] D34150: [LV] Test once if vector trip count is zero, instead of twice

Ayal Zaks via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 15:15:34 PDT 2017


Ayal updated this revision to Diff 106320.
Ayal added a comment.

Added the following comment following review, and updated a testcase that was recently modified (if-conversion-nest.ll)

  // Now, compare the new count to zero. If it is zero skip the vector loop and
  // jump to the scalar loop. This check also covers the case where the
  // backedge-taken count is unit##_max: adding one to it will overflow leading
  // to an incorrect trip count of zero. In this case we will also jump to the
  // scalar loop, instead of trying to vectorize with a correct trip count, as
  // such loops are expected to be extremely rare.
  emitMinimumIterationCountCheck(Lp, ScalarPH); 


https://reviews.llvm.org/D34150

Files:
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Transforms/LoopVectorize/X86/float-induction-x86.ll
  test/Transforms/LoopVectorize/debugloc.ll
  test/Transforms/LoopVectorize/first-order-recurrence.ll
  test/Transforms/LoopVectorize/float-induction.ll
  test/Transforms/LoopVectorize/if-conversion-nest.ll
  test/Transforms/LoopVectorize/induction-step.ll
  test/Transforms/LoopVectorize/induction.ll
  test/Transforms/LoopVectorize/interleaved-accesses-pred-stores.ll
  test/Transforms/LoopVectorize/interleaved-accesses.ll
  test/Transforms/LoopVectorize/iv_outside_user.ll
  test/Transforms/LoopVectorize/miniters.ll
  test/Transforms/LoopVectorize/runtime-check-readonly.ll
  test/Transforms/LoopVectorize/runtime-check.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D34150.106320.patch
Type: text/x-patch
Size: 25503 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170712/9cec1bd5/attachment.bin>


More information about the llvm-commits mailing list