]> granicus.if.org Git - llvm/commit
[LV] Tail-Loop Folding
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Thu, 1 Aug 2019 18:21:44 +0000 (18:21 +0000)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Thu, 1 Aug 2019 18:21:44 +0000 (18:21 +0000)
commitd527e646408b6ef4933e231cf5d9242c41033876
treea781ceae8b5b9bd5ced3d240d8a7b0101aa35945
parent074cd073b8ecc954445bf733d128b64db72ef729
[LV] Tail-Loop Folding

This allows folding of the scalar epilogue loop (the tail) into the main
vectorised loop body when the loop is annotated with a "vector predicate"
metadata hint. To fold the tail, instructions need to be predicated (masked),
enabling/disabling lanes for the remainder iterations.

Differential Revision: https://reviews.llvm.org/D65197

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@367592 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/X86/tail_loop_folding.ll [new file with mode: 0644]