This fixes the missing cost accounting for extra cost of shuffle instruction due to the
vectorization of jumbled load added through the patch https://reviews.llvm.org/D36130.
Maybe to move this into the if-statement:
if (TreeEntry *UserTreeEntry = &VectorizableTree[Idx])
I am not an expert in SLPVectorizer.
Sorry, I could not get your question.
Recently I started running these lit test, LNT test and bootstrap test to make sure build bot does not break upon commit.
Since this shuffle instruction is only introduced to reorder the loaded lanes which is jumbled, it falls under SK_PermuteSingleSrc shuffle kind. Also due to this very reason
Now I see what you meant. It was not clear for me whether you checked the execution time of the regressed benchmarks or not. It is not a problem. I can check it using the patch.
I don't have any other questions.
Presumably this fixes the reported regressions?
Cf. the test added in D40883 to check if a cost is accounted for (or not).
Surely &VectorizableTree[Idx] is not null.
This also applies btw to checking it newTreeEntry().
Have Mask be a reference, to a const SmallVector?