From: Alexey Bataev Date: Sat, 7 Jan 2023 01:01:48 +0000 (-0800) Subject: [SLP][NFC]Fix compile build by declaring ArrayRef, NFC. X-Git-Tag: upstream/17.0.6~21834 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=996ad44b97e6dda8e4759021c998896f76c38c76;p=platform%2Fupstream%2Fllvm.git [SLP][NFC]Fix compile build by declaring ArrayRef, NFC. Fix compiler build reported in https://lab.llvm.org/buildbot#builders/243/builds/218 --- diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index e7c45c5..dc566dc 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -4083,7 +4083,8 @@ void BoUpSLP::reorderNodeWithReuses(TreeEntry &TE, ArrayRef Mask) const { // Clear reorder since it is going to be applied to the new mask. TE.ReorderIndices.clear(); // Try to improve gathered nodes with clustered reuses, if possible. - SmallVector NewOrder(ArrayRef(NewMask).slice(0, Sz)); + ArrayRef Slice = ArrayRef(NewMask).slice(0, Sz); + SmallVector NewOrder(Slice.begin(), Slice.end()); inversePermutation(NewOrder, NewMask); reorderScalars(TE.Scalars, NewMask); // Fill the reuses mask with the identity submasks.