[SLP] limit vectorization of Constant subclasses (PR33958)
commit71f28d66ddfc9e9692ba9d11e3d2c0401ca1a0ae
authorSanjay Patel <spatel@rotateright.com>
Sun, 15 Sep 2019 13:03:24 +0000 (15 13:03 +0000)
committerSanjay Patel <spatel@rotateright.com>
Sun, 15 Sep 2019 13:03:24 +0000 (15 13:03 +0000)
tree140dd2f5d5a7d240faeb1ceab362516247f0e66a
parent2d52f8b93f1eab69fbed5883a2b8df1d114feb8e
[SLP] limit vectorization of Constant subclasses (PR33958)

This is a fix for:
https://bugs.llvm.org/show_bug.cgi?id=33958

It seems universally true that we would not want to transform this kind of
sequence on any target, but if that's not correct, then we could view this
as a target-specific cost model problem. We could also white-list ConstantInt,
ConstantFP, etc. rather than blacklist Global and ConstantExpr.

Differential Revision: https://reviews.llvm.org/D67362

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@371931 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Vectorize/SLPVectorizer.cpp
test/Transforms/SLPVectorizer/X86/consecutive-access.ll