[PATCH] D43208: [LV][nearly NFC] Move isLegalMasked* functions from Legality to CostModel
Hideki Saito via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 12 13:15:56 PST 2018
hsaito created this revision.
hsaito added reviewers: aemerson, hfinkel, mkuper, fhahn, rengolin.
Herald added a subscriber: llvm-commits.
Please see http://lists.llvm.org/pipermail/llvm-dev/2018-January/120164.html for RFC and the discussions.
All SIMD architectures can emulate masked load/store/gather/scatter through element-wise condition check, scalar load/store, and insert/extract. Therefore, bailing out of vectorization as legality failure, when they return false, is incorrect. We should proceed to cost model and determine profitability.
This patch is to address the vectorizer's architectural limitation described above. As such, I tried to keep the cost model and vectorize/don't-vectorize behavior nearly unchanged. Cost model tuning should be done separately.
Repository:
rL LLVM
https://reviews.llvm.org/D43208
Files:
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Transforms/LoopVectorize/conditional-assignment.ll
test/Transforms/LoopVectorize/hoist-loads.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D43208.133920.patch
Type: text/x-patch
Size: 17938 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180212/dbb8602e/attachment.bin>
More information about the llvm-commits
mailing list