From cdf8a53c1d33ad79be857991fbe4e7e7ced71021 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Tue, 16 Nov 2021 06:08:48 -0800 Subject: [PATCH] [SLP]Fix windows build, NFC. Need to put `IndexIdx` var to the list of captures. --- llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp index 2d1ba0b..db9e115 100644 --- a/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp +++ b/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp @@ -3883,10 +3883,10 @@ void BoUpSLP::buildTree_rec(ArrayRef VL, unsigned Depth, // Required to be able to find correct matches between different 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(V) ->getOperand(IndexIdx) ->getType(); -- 2.7.4