[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)
commit6f1f85f0e1bc88b1151080edddbe4794a0b81b32
tree3a8b0152ac404ee901a3c4ca9184285b39d23112
parentf7f52ef65df2efbb6619be15afd0864c84466346
[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.

llvm-svn: 265157
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/pr27163.ll [new file with mode: 0644]