[PATCH] D57382: [LV] Add planForInterleaving helper, to create VPlan if they are missing.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 29 07:01:05 PST 2019


fhahn created this revision.
fhahn added reviewers: dcaballe, Ayal, hsaito, mkuper.
Herald added subscribers: rogfer01, rkruppe, tschuett, bollu, hiraditya.

In some cases, we exit early from LVP::plan() (if computeMaxVF returns
None) and do not create any VPlans. It is still possible though that we
decide to interleave iterations. We will crash if there are no plans in
this case. LVP::planForInterleaving creates a single VPlan with VF == 1
for interleaving, if VPlans is empty.

Alternatively we could make computeMaxVF return 1 instead of None, but
then we would spend unnecessary compile time.

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=6477


https://reviews.llvm.org/D57382

Files:
  llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
  llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
  llvm/test/Transforms/LoopVectorize/interleave-need-vplan.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57382.184079.patch
Type: text/x-patch
Size: 5189 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190129/53adcf8c/attachment.bin>


More information about the llvm-commits mailing list