[all-commits] [llvm/llvm-project] bccc9a: Don't vectorize PHIs in catchswitch blocks
Bill Schmidt via All-commits
all-commits at lists.llvm.org
Tue Jul 19 06:11:02 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bccc9aa81c1c1d212acd3314895731ec4de30e35
https://github.com/llvm/llvm-project/commit/bccc9aa81c1c1d212acd3314895731ec4de30e35
Author: William Schmidt <william.schmidt at intel.com>
Date: 2022-07-19 (Tue, 19 Jul 2022)
Changed paths:
M llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
A llvm/test/Transforms/SLPVectorizer/X86/catchswitch.ll
Log Message:
-----------
Don't vectorize PHIs in catchswitch blocks
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.
More information about the All-commits
mailing list