[all-commits] [llvm/llvm-project] 49b0e6: [LoopVectorize] Enable hoisting of runtime checks ...

David Sherwood via All-commits all-commits at lists.llvm.org
Mon Dec 18 01:42:09 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 49b0e6dcc296792b577ae8f0f674e61a0929b99d
      https://github.com/llvm/llvm-project/commit/49b0e6dcc296792b577ae8f0f674e61a0929b99d
  Author: David Sherwood <57997763+david-arm at users.noreply.github.com>
  Date:   2023-12-18 (Mon, 18 Dec 2023)

  Changed paths:
    M llvm/lib/Analysis/LoopAccessAnalysis.cpp
    M llvm/test/Transforms/LoopVectorize/invariant-store-vectorization.ll
    M llvm/test/Transforms/LoopVectorize/multiple-strides-vectorization.ll
    M llvm/test/Transforms/LoopVectorize/runtime-checks-difference.ll
    M llvm/test/Transforms/LoopVectorize/runtime-checks-hoist.ll

  Log Message:
  -----------
  [LoopVectorize] Enable hoisting of runtime checks by default (#71538)

With commit https://reviews.llvm.org/D152366 I introduced functionality
that permitted the hoisting of runtime memory checks from a vectorised
inner loop to the preheader of the next outer-most loop. This is useful
for benchmarks like SPEC2017's x264 where the inner loop is vectorised
and only has a small trip count. In such cases the runtime memory checks
become expensive and since the checks never fail in the case of x264 it
makes sense to do this. However, this behaviour was controlled by the
flag -hoist-runtime-checks which was off by default.

This patch enables this flag by default for all targets, since I believe
this is a generally beneficial thing to do. I have tested this with
SPEC2017 and I see 2.3% and 2.6% improvements with x264 on neoverse-v1
and neoverse-n1, respectively. Similarly, I saw slight improvements in
the overall geomean on both machines. The only other notable changes
were a 1% drop in the roms benchmark, which was compensated for by a 1%
improvement in fotonik3d.




More information about the All-commits mailing list