[PATCH] D130044: [SLP] Don't vectorize PHIs in catchswitch blocks
Bill Schmidt via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 18 14:19:35 PDT 2022
wjschmidt created this revision.
wjschmidt added reviewers: vdmitrie, ABataev, RKSimon, vporpo, spatel.
Herald added a subscriber: hiraditya.
Herald added a project: All.
wjschmidt requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
We currently assert in vectorizeTree(TreeEntry*) when processing a PHI
bundle in a block containing a catchswitch. We attempt to set the
IRBuilder insertion point following the catchswitch, which is invalid.
This is done so that ShuffleBuilder.finalize() knows where to insert
a shuffle if one is needed.
To avoid this occurring, watch out for catchswitch blocks during
buildTree_rec() processing, and avoid adding PHIs in such blocks to
the vectorizable tree. It is unlikely that constraining vectorization
over an exception path will cause a noticeable performance loss, so
this seems preferable to trying to anticipate when a shuffle will and
will not be required.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D130044
Files:
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/catchswitch.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D130044.445624.patch
Type: text/x-patch
Size: 5153 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220718/e866cc84/attachment.bin>
More information about the llvm-commits
mailing list