[llvm] [BranchFolding] Fix assertion failure in HoistCommonCodeInSuccs (PR #141028)

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Thu May 22 04:24:59 PDT 2025


================
@@ -0,0 +1,80 @@
+# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
+# RUN: llc -mtriple=armv7-apple-ios --run-pass=branch-folder %s -o - | FileCheck %s
+
+## Don't crash in branch-folder's HoistCommonCodeInSuccs when TBB and FBB are
+## the same block.
----------------
jmorse wrote:

I think this comment needs to be detached from the implementation details and made broader -- "We hoist code from successor blocks, and in abnormal circumstances we can have control flow that branches to the same block -- test that we handle this correctly". Or something.

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


More information about the llvm-commits mailing list