OSDN Git Service

[SLPVectorizer] Don't insert an extractelement before a catchswitch
authorDavid Majnemer <david.majnemer@gmail.com>
Fri, 1 Apr 2016 17:28:15 +0000 (17:28 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Fri, 1 Apr 2016 17:28:15 +0000 (17:28 +0000)
commit3f538b527eedb0a5025265f867aba5c70998bb4a
tree92fc2620b0528f974a55c340be4ca5d154f5bc55
parenta7f5174cd1d706984fb470f97832e28cbd535c29
[SLPVectorizer] Don't insert an extractelement before a catchswitch

A catchswitch cannot be preceded by another instruction in the same
basic block (other than a PHI node).

Instead, insert the extract element right after the materialization of
the vectorized value.  This isn't optimal but is a reasonable compromise
given the constraints of WinEH.

This fixes PR27163.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265157 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/X86/pr27163.ll [new file with mode: 0644]