[llvm] [IfConversion] Fix bug related to !HasFallThrough (PR #145471)

Mikael Holmén via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 24 01:14:17 PDT 2025


================
@@ -21,16 +21,18 @@ name:            foo
 body:             |
   ; CHECK-LABEL: name: foo
   ; CHECK: bb.0:
-  ; CHECK:   successors: %bb.2(0x40000000), %bb.1(0x40000000)
-  ; CHECK:   tBcc %bb.2, 1 /* CC::ne */, $cpsr
-  ; CHECK: bb.1:
-  ; CHECK:   successors:
-  ; CHECK:   tBL 14 /* CC::al */, $cpsr, @__stack_chk_fail
-  ; CHECK: bb.2:
-  ; CHECK:   tBL 1 /* CC::ne */, $cpsr, @__stack_chk_fail
-  ; CHECK:   $sp = tADDspi $sp, 2, 14 /* CC::al */, $noreg
-  ; CHECK:   $sp = tADDspi $sp, 2, 14 /* CC::al */, $noreg
-  ; CHECK:   tTAILJMPdND @bar, 14 /* CC::al */, $cpsr
+  ; CHECK-NEXT:   successors: %bb.1(0x40000000), %bb.2(0x40000000)
----------------
mikaelholmen wrote:

Maybe mention something in the commit message about why we get a diff in this testcase? I suppose it was correct before too, just that now the condition in bb.0 and bb.1/bb.2 are swapped compared to before?

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


More information about the llvm-commits mailing list