[llvm] cdf8a53 - [SLP]Fix windows build, NFC.

Alexey Bataev via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 16 06:10:16 PST 2021


Author: Alexey Bataev
Date: 2021-11-16T06:09:51-08:00
New Revision: cdf8a53c1d33ad79be857991fbe4e7e7ced71021

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

LOG: [SLP]Fix windows build, NFC.

Need to put `IndexIdx` var to the list of captures.

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 2d1ba0b80d17..db9e1151c0a4 100644
--- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
+++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp
@@ -3883,10 +3883,10 @@ void BoUpSLP::buildTree_rec(ArrayRef<Value *> VL, unsigned Depth,
       // Required to be able to find correct matches between 
diff erent gather
       // nodes and reuse the vectorized values rather than trying to gather them
       // again.
-      const int IndexIdx = 1;
+      int IndexIdx = 1;
       Type *VL0Ty = VL0->getOperand(IndexIdx)->getType();
       Type *Ty = all_of(VL,
-                        [VL0Ty](Value *V) {
+                        [VL0Ty, IndexIdx](Value *V) {
                           return VL0Ty == cast<GetElementPtrInst>(V)
                                               ->getOperand(IndexIdx)
                                               ->getType();


        


More information about the llvm-commits mailing list