[SLP]Reorder counters for same values, if the root node is reordered.
authorAlexey Bataev <a.bataev@outlook.com>
Mon, 3 Apr 2023 13:50:07 +0000 (06:50 -0700)
committerAlexey Bataev <a.bataev@outlook.com>
Mon, 3 Apr 2023 14:52:49 +0000 (07:52 -0700)
commitc1660006b2809a17e9e33034252306a703fdb720
tree25b512eacbc4b5c3264dcde4136f0e287927435a
parentb15a946b9f59f91518ae5e2cb6125592d9c1bf3c
[SLP]Reorder counters for same values, if the root node is reordered.

The counters for the repeated scalars are ordered in the natural order,
but the original scalars might be reordered during SLP graph reordering
and this order can be dropped. Need to use the scalars after the
reordering, not the original ones, to emit correct code for same value
counters.
llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
llvm/test/Transforms/SLPVectorizer/X86/same-scalars-reordered-in-reduction.ll