[SLP]Fix possible crash on unreachable incoming values sorting.
authorAlexey Bataev <a.bataev@outlook.com>
Mon, 19 Jul 2021 11:18:27 +0000 (04:18 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Mon, 19 Jul 2021 11:54:53 +0000 (04:54 -0700)
commitd8d8b4574ab40e319d4a32a9c37eae771c43b8f0
treebb4a9e21b137734e60cad72e3c6fb8fcfa95494a
parente908e063d1f953984fff14636b1c1ad96de8d500
[SLP]Fix possible crash on unreachable incoming values sorting.

The incoming values for PHI nodes may come from unreachable BasicBlocks,
need to handle this case.

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