[PATCH] D78911: [LV] Induction Variable does not remain scalar under tail-folding.

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 27 03:10:54 PDT 2020


SjoerdMeijer created this revision.
SjoerdMeijer added reviewers: Ayal, fhahn, samparker.
Herald added subscribers: rkruppe, hiraditya.
Herald added a project: LLVM.

If tail-folding of the scalar remainder loop is applied, the primary induction variable is splat to a vector and used by the masked load/store vector instructions, thus the IV does not remain scalar.

This is a minimal change extracted from D78353 <https://reviews.llvm.org/D78353>, and is a useful change/fix on its own. This triggers in function `@example2` in test case `test/Transforms/LoopVectorize/X86/small-size.ll`. Please note that there are quite some changes in this file, but that file was partly auto-generated and partly hand-edited, and I've regenerated all expected output.


https://reviews.llvm.org/D78911

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/X86/small-size.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D78911.260260.patch
Type: text/x-patch
Size: 29102 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200427/00fbf175/attachment.bin>


More information about the llvm-commits mailing list