[SLP]Improve splat detection.
authorAlexey Bataev <a.bataev@outlook.com>
Fri, 12 Nov 2021 15:11:51 +0000 (07:11 -0800)
committerAlexey Bataev <a.bataev@outlook.com>
Mon, 15 Nov 2021 15:50:34 +0000 (07:50 -0800)
commit036207d5f261b6d60913cfa705b5432630126f40
tree0ec114009016b7f8a3d7c11f2a0c8b9e0782c58e
parentda168dd875bf0392e8e88834009d776bfbaae376
[SLP]Improve splat detection.

A bunch of scalars can be treated as a splat not only if all elements
are the same but also if some of them are undefvalues.

Differential Revision: https://reviews.llvm.org/D113774
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/pr35497.ll