From 15cf497ca692fb9cda688ef60564b9a3ed2c84a8 Mon Sep 17 00:00:00 2001 From: sgokhale Date: Sun, 4 Oct 2026 23:42:02 -0700 Subject: [PATCH] address unused-vars in the no-assert build for PR #213007 --- llvm/lib/Transforms/Vectorize/VectorCombine.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp index dbbc312cf2bd8..f5fe77d8791fc 100644 --- a/llvm/lib/Transforms/Vectorize/VectorCombine.cpp +++ b/llvm/lib/Transforms/Vectorize/VectorCombine.cpp @@ -6924,12 +6924,10 @@ bool VectorCombine::foldShuffleOfAdjacentLoads(Instruction &I) { // shuffle 0th operand = HighLoad // shuffle 1st operand = LowLoad // Implication with this is shuffle mask for the wide load changes - auto RemapMask = [LowLoad, HighLoad, NumElts](ShuffleVectorInst *SV, - SmallVectorImpl &NewMask) { + auto RemapMask = [&](ShuffleVectorInst *SV, SmallVectorImpl &NewMask) { Value *SVOp0 = SV->getOperand(0); - Value *SVOp1 = SV->getOperand(1); - assert(((SVOp0 == LowLoad && SVOp1 == HighLoad) || - (SVOp0 == HighLoad && SVOp1 == LowLoad)) && + assert(((SVOp0 == LowLoad && SV->getOperand(1) == HighLoad) || + (SVOp0 == HighLoad && SV->getOperand(1) == LowLoad)) && "Shuffle operands must be exactly {LowLoad, HighLoad} or {HighLoad, " "LowLoad}"); NewMask.assign(SV->getShuffleMask().begin(), SV->getShuffleMask().end());