[llvm] [LV][NFC] Fix up else-after-return introduced by PR #216981 (PR #217337)

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 06:23:41 PDT 2026


https://github.com/david-arm created https://github.com/llvm/llvm-project/pull/217337

None

>From 6563ea9209fc184a5466b3561a35f424bb9a63e0 Mon Sep 17 00:00:00 2001
From: David Sherwood <david.sherwood at arm.com>
Date: Wed, 19 Aug 2026 13:21:19 +0000
Subject: [PATCH] [LV][NFC] Fix up else-after-return introduced by PR #216981

---
 llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
index 2423b6ef18ae9..3d3d464ee6ca1 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h
@@ -381,7 +381,7 @@ class VPBuilder {
       if (MinEC == 1)
         return VScale;
       // TODO: Move this optimization into createOverflowingOp directly.
-      else if (isPowerOf2_32(MinEC)) {
+      if (isPowerOf2_32(MinEC)) {
         VPValue *ShtAmt = Plan.getConstantInt(Ty, Log2_32(MinEC));
         return createOverflowingOp(Instruction::Shl, {VScale, ShtAmt},
                                    {true, false});



More information about the llvm-commits mailing list