[PATCH] D102834: [SLPVectorizer] Implement initial memory versioning.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 16 10:36:35 PDT 2021


fhahn updated this revision to Diff 372992.
fhahn added a comment.

Rebased, added back `verifyFunction` call, remove commented-out code. Also precommitted a bunch of tests which exposed crashes in earlier versions of the patch.

In D102834#2967556 <https://reviews.llvm.org/D102834#2967556>, @steplong wrote:

>> I am seeing 5-10% speedups when vectorizing `quant_4x4`. After runtime check generation, there's still another issue though (conditional load that's not hoisted out).
>
> Hi @fhahn, I tried cherry-picking this patch and I'm not seeing `quant_4x4` getting vectorized. Maybe I'm missing something here. The commandline invocation I'm using is
> `clang --target=aarch64-linux-gnu -mllvm -slp-memory-versioning -mllvm -debug-only=SLP -O3 -c quant_4x4.c -S -o quant_4x4.S`

I think I measured this with modifying the source (hoisting the loads) and running the loop vectorizer. Even with runtime checks, we need to improve if-conversion for SLP as mentioned in https://lists.llvm.org/pipermail/llvm-dev/2021-September/152740.html. Also, the current patch does not support vectorizing reduction values that are returned, but that should be a relatively easy extension.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D102834

Files:
  llvm/include/llvm/Transforms/Vectorize/SLPVectorizer.h
  llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
  llvm/test/Transforms/SLPVectorizer/AArch64/loadi8.ll
  llvm/test/Transforms/SLPVectorizer/AArch64/memory-runtime-checks-in-loops.ll
  llvm/test/Transforms/SLPVectorizer/AArch64/memory-runtime-checks.ll
  llvm/test/Transforms/SLPVectorizer/X86/memory-runtime-checks.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102834.372992.patch
Type: text/x-patch
Size: 65830 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210916/c2eea309/attachment.bin>


More information about the llvm-commits mailing list