[IAI,LV] Avoid creating a scalar epilogue due to gaps in interleave-groups when
authorDorit Nuzman <dorit.nuzman@intel.com>
Mon, 22 Oct 2018 06:17:09 +0000 (06:17 +0000)
committerDorit Nuzman <dorit.nuzman@intel.com>
Mon, 22 Oct 2018 06:17:09 +0000 (06:17 +0000)
commit3ec99fe21bbc44d0a3ff898644f71aa2e1e8d6ef
tree611aadca17d90c373ca52fd74c2c9300313ac141
parent2336dc3c51c8883a1ef171a4236c448b54f6993c
[IAI,LV] Avoid creating a scalar epilogue due to gaps in interleave-groups when
optimizing for size

LV is careful to respect -Os and not to create a scalar epilog in all cases
(runtime tests, trip-counts that require a remainder loop) except for peeling
due to gaps in interleave-groups. This patch fixes that; -Os will now have us
invalidate such interleave-groups and vectorize without an epilog.

The patch also removes a related FIXME comment that is now obsolete, and was
also inaccurate:
"FIXME: return None if loop requiresScalarEpilog(<MaxVF>), or look for a smaller
MaxVF that does not require a scalar epilog."
(requiresScalarEpilog() has nothing to do with VF).

Reviewers: Ayal, hsaito, dcaballe, fhahn

Reviewed By: Ayal

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

llvm-svn: 344883
llvm/include/llvm/Analysis/VectorUtils.h
llvm/lib/Analysis/VectorUtils.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/X86/x86-interleaved-accesses-masked-group.ll