[LV] Consider Loop Unroll Hints When Making Interleave Decisions
authorBardia Mahjour <bmahjour@ca.ibm.com>
Wed, 28 Apr 2021 21:24:26 +0000 (17:24 -0400)
committerBardia Mahjour <bmahjour@ca.ibm.com>
Wed, 28 Apr 2021 21:27:52 +0000 (17:27 -0400)
commitddb3b26a12694a61611223eb3a84532762cbe4b8
tree51a6b351b2a460c05079f7c79ddac3e44b73163d
parentea12d779bc238c387511fe7462020f4ecf4a8246
[LV] Consider Loop Unroll Hints When Making Interleave Decisions

This patch causes the loop vectorizer to not interleave loops that have
nounroll loop hints (llvm.loop.unroll.disable and llvm.loop.unroll_count(1)).
Note that if a particular interleave count is being requested
(through llvm.loop.interleave_count), it will still be honoured, regardless
of the presence of nounroll hints.

Reviewed By: Meinersbur

Differential Revision: https://reviews.llvm.org/D101374
llvm/include/llvm/Transforms/Utils/LoopUtils.h
llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
llvm/lib/Transforms/Utils/LoopUtils.cpp
llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/X86/no_fpmath.ll
llvm/test/Transforms/LoopVectorize/explicit_outer_detection.ll
llvm/test/Transforms/LoopVectorize/nounroll.ll [new file with mode: 0644]