[llvm] 996ad44 - [SLP][NFC]Fix compile build by declaring ArrayRef, NFC.

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 6 17:03:01 PST 2023


Author: Alexey Bataev
Date: 2023-01-06T17:01:48-08:00
New Revision: 996ad44b97e6dda8e4759021c998896f76c38c76

URL: https://github.com/llvm/llvm-project/commit/996ad44b97e6dda8e4759021c998896f76c38c76
DIFF: https://github.com/llvm/llvm-project/commit/996ad44b97e6dda8e4759021c998896f76c38c76.diff

LOG: [SLP][NFC]Fix compile build by declaring ArrayRef, NFC.

Fix compiler build reported in https://lab.llvm.org/buildbot#builders/243/builds/218

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
index e7c45c5b3753..dc566dcf8309 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<int> 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<unsigned> NewOrder(ArrayRef(NewMask).slice(0, Sz));
+  ArrayRef<int> Slice = ArrayRef(NewMask).slice(0, Sz);
+  SmallVector<unsigned> NewOrder(Slice.begin(), Slice.end());
   inversePermutation(NewOrder, NewMask);
   reorderScalars(TE.Scalars, NewMask);
   // Fill the reuses mask with the identity submasks.


        


More information about the llvm-commits mailing list