[PATCH] D86452: [LV] Fix scalar cost for tail predicated loops
Anna Welker via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 24 06:06:04 PDT 2020
anwel created this revision.
anwel added reviewers: dmgreen, SjoerdMeijer, samparker, Ayal, fhahn, gilr.
anwel added a project: LLVM.
Herald added subscribers: llvm-commits, hiraditya.
anwel requested review of this revision.
When it comes to the scalar cost of any predicated block, the loop vectorizer by default regards this predication as a sign that it is looking at an if-conversion and divides the scalar cost of the block by 2, assuming it would only be executed half the time. This however makes no sense if the predication has been introduced to tail predicate the loop.
https://reviews.llvm.org/D86452
Files:
llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
llvm/test/Transforms/LoopVectorize/ARM/scalar-block-cost.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86452.287366.patch
Type: text/x-patch
Size: 8312 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200824/e976b68f/attachment.bin>
More information about the llvm-commits
mailing list