[llvm] f53fe86 - [Vectorize] Silence a warning (NFC)

Jie Fu via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 22 16:57:33 PST 2026


Author: Jie Fu
Date: 2026-01-23T08:56:06+08:00
New Revision: f53fe860385c706903f74ac45404e95a841c113f

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

LOG: [Vectorize] Silence a warning (NFC)

/llvm-project/llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp:1533:11:
 error: unused variable 'FindIVSelect' [-Werror,-Wunused-variable]
    auto *FindIVSelect = findUserOf<Instruction::Select>(FindIVCmp);
          ^
1 error generated.

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp b/llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
index 2196501f4cd3a..37095e0dc94e1 100644
--- a/llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
+++ b/llvm/lib/Transforms/Vectorize/VPlanConstruction.cpp
@@ -1530,7 +1530,8 @@ bool VPlanTransforms::handleMultiUseReductions(VPlan &Plan) {
         m_VPInstruction<VPInstruction::ComputeReductionResult>(m_VPValue())));
     // Find the icmp -> select pattern wrapping the reduction result.
     auto *FindIVCmp = findUserOf<Instruction::ICmp>(FindIVRdxResult);
-    auto *FindIVSelect = findUserOf<Instruction::Select>(FindIVCmp);
+    [[maybe_unused]] auto *FindIVSelect =
+        findUserOf<Instruction::Select>(FindIVCmp);
     assert(FindIVSelect->getParent() == MinOrMaxResult->getParent() &&
            "both results must be computed in the same block");
     MinOrMaxResult->moveBefore(*FindIVRdxResult->getParent(),


        


More information about the llvm-commits mailing list