[PATCH] D99569: [AArch64][SVE] Fix vectoriser bug where predicated stores were dropped

Joe Ellis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 31 05:22:03 PDT 2021


joechrisellis updated this revision to Diff 334418.
joechrisellis added a comment.

Minor change to `x86-predication.ll` test.

The codegen from before the patch had a simpler CFG because we weren’t
predicating on loads. In this particular case, it turns out that it’s actually
fine to not explicitly predicate on the loads, but only because they exist in a
basic block next to a `udiv` which does require predication, so we get it ‘for
free’ in a sense. This is not guaranteed to always be the case, though, so we
have to be careful.

The result of this patch is that the IR CFG for `scalarize_and_sink_gather` in
`x86-predication.ll` is larger, and so the test needs to be updated to reflect
that. Ultimately, though, the machine code lowering is the same, so no loss in
performance.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99569

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/AArch64/scalarize-store-with-predication.ll
  llvm/test/Transforms/LoopVectorize/X86/x86-predication.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D99569.334418.patch
Type: text/x-patch
Size: 5923 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210331/181c46aa/attachment.bin>


More information about the llvm-commits mailing list