Title: [LV] Handle Fold-Tail of loops with vectorizarion factor equal to 1
authorAnh Tuyen Tran <anhtuyen@ca.ibm.com>
Fri, 22 May 2020 13:30:56 +0000 (13:30 +0000)
committerAnh Tuyen Tran <anhtuyen@ca.ibm.com>
Fri, 22 May 2020 13:30:56 +0000 (13:30 +0000)
commit13bf6039c9ae959598e8c117c3d8c5a72303fd2b
treec2b82f6e649c440b8a9b58a4b6426e15372731aa
parent4ed909bb5b59ba8460cd64217e600c4c8c4acf63
Title: [LV] Handle Fold-Tail of loops with vectorizarion factor equal to 1

Summary:
When handling loops whose VF is 1, fold-tail vectorization sets the
backedge taken count of the original loop with a vector of a single
element. This causes type-mismatch during instruction generartion.

The purpose of this patch is toto address the case of VF==1.

Reviewer: Ayal (Ayal Zaks), bmahjour (Bardia Mahjour), fhahn (Florian Hahn), gilr (Gil Rapaport), rengolin (Renato Golin)

Reviewed By: Ayal (Ayal Zaks), bmahjour (Bardia Mahjour), fhahn (Florian Hahn)

Subscribers: Ayal (Ayal Zaks), rkruppe (Hanna Kruppe), bmahjour (Bardia Mahjour), rogfer01 (Roger Ferrer Ibanez), vkmr (Vineet Kumar), bollu (Siddharth Bhat), hiraditya (Aditya Kumar), llvm-commits (Mailing List llvm-commits)

Tag: LLVM

Differential Revision: https://reviews.llvm.org/D79976
llvm/lib/Transforms/Vectorize/VPlan.cpp
llvm/test/Transforms/LoopVectorize/tail-folding-vectorization-factor-1.ll [new file with mode: 0644]