[all-commits] [llvm/llvm-project] befc95: [LoopVectorize] Permit tail-folding for low trip c...

david-arm via All-commits all-commits at lists.llvm.org
Mon May 16 01:14:45 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: befc952045066e840c7d84b3d3a4ab112a36366a
      https://github.com/llvm/llvm-project/commit/befc952045066e840c7d84b3d3a4ab112a36366a
  Author: David Sherwood <david.sherwood at arm.com>
  Date:   2022-05-16 (Mon, 16 May 2022)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
    A llvm/test/Transforms/LoopVectorize/AArch64/sve-low-trip-count.ll
    A llvm/test/Transforms/LoopVectorize/AArch64/sve-tail-folding-optsize.ll
    A llvm/test/Transforms/LoopVectorize/RISCV/low-trip-count.ll

  Log Message:
  -----------
  [LoopVectorize] Permit tail-folding for low trip counts using scalable vectors

When the loop vectoriser encounters a known low trip count it tries
to create a single predicated loop in order to get the benefit of
vectorisation and eliminate the scalar tail. However, until now the
vectoriser prevented the use of scalable vectors in this case due
to concerns in the past about stability. I believe that tail-folded
loops using scalable vectors are now sufficiently well tested that
we can enable this. For the same reason I've also enabled it when
optimising for code size too.

Tests added here:

  Transforms/LoopVectorize/AArch64/sve-low-trip-count.ll
  Transforms/LoopVectorize/AArch64/sve-tail-folding-optsize.ll
  Transforms/LoopVectorize/RISCV/low-trip-count.ll

Differential Revision: https://reviews.llvm.org/D121595




More information about the All-commits mailing list