[llvm] [LoopFusion] remove else after return (NFC) (PR #200783)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 1 03:59:37 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-transforms

Author: Afonso Rafael (Gafanhoto) (Alf0nso)

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/200783.diff


1 Files Affected:

- (modified) llvm/lib/Transforms/Scalar/LoopFuse.cpp (+1-2) 


``````````diff
diff --git a/llvm/lib/Transforms/Scalar/LoopFuse.cpp b/llvm/lib/Transforms/Scalar/LoopFuse.cpp
index 47bed80cb84ea..bce9a04ddd0b2 100644
--- a/llvm/lib/Transforms/Scalar/LoopFuse.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopFuse.cpp
@@ -1323,8 +1323,7 @@ struct LoopFuser {
     // the loop
     if (FC0.GuardBranch->getSuccessor(0) == FC0.Preheader)
       return (FC1.GuardBranch->getSuccessor(0) == FC1.Preheader);
-    else
-      return (FC1.GuardBranch->getSuccessor(1) == FC1.Preheader);
+    return (FC1.GuardBranch->getSuccessor(1) == FC1.Preheader);
   }
 
   /// Modify the latch branch of FC to be unconditional since successors of the

``````````

</details>


https://github.com/llvm/llvm-project/pull/200783


More information about the llvm-commits mailing list