[SLP]Fix emission of the shrink shuffles.
authorAlexey Bataev <a.bataev@outlook.com>
Fri, 15 Oct 2021 16:47:50 +0000 (09:47 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Mon, 18 Oct 2021 20:13:12 +0000 (13:13 -0700)
commitb9cfa016daae725e4ed8173b431afb5e01cb80a6
tree72d3fb150d03a535a43a6ae6e75bd5c66a408568
parent313c657fcea371a533ad5f3adcff44fabc6531ae
[SLP]Fix emission of the shrink shuffles.

Need to follow the order of the reused scalars from the
ReuseShuffleIndices mask rather than rely on the natural order.

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