[PATCH] D79783: [LoopVectorize] Fallback to a scalar epilogue when TP fails
Pierre van Houtryve via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 12 06:57:27 PDT 2020
Pierre-vh created this revision.
Pierre-vh added reviewers: SjoerdMeijer, samparker, dmgreen.
Herald added subscribers: llvm-commits, hiraditya, kristof.beyls.
Herald added a project: LLVM.
This patch teaches the vectorizer to fallback to a scalar epilogue when a tail-predication hint is found, but tail-predication can't happen for some reason.
(Previously, the vectorizer just gave up in those situations)
For instance, the loop in the test can be vectorized just fine, but previously, when tail-predication was forced on, it wasn't vectorized due to an outside user that blocked tail-predication.
This led to major regressions in some programs when ARM MVE Tail-predication was enabled.
Note that I'm still not sure about those changes. Is my approach correct? If not, what could be done differently?
Thank you very much for your feedback.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D79783
Files:
llvm/include/llvm/Transforms/Vectorize/LoopVectorizationLegality.h
llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/ARM/tail-folding-scalar-epilogue-fallback.ll
llvm/test/Transforms/LoopVectorize/use-scalar-epilogue-if-tp-fails.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79783.263421.patch
Type: text/x-patch
Size: 28552 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200512/1eb83a7c/attachment-0001.bin>
More information about the llvm-commits
mailing list