[llvm] [RISCV] Add branch folding before branch relaxation (PR #134760)

Mikhail R. Gadelha via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 9 08:37:14 PDT 2025


================
@@ -9,21 +9,11 @@ define i16 @f() {
 ; CHECK:       # %bb.0: # %BB
 ; CHECK-NEXT:    addi sp, sp, -16
 ; CHECK-NEXT:    .cfi_def_cfa_offset 16
-; CHECK-NEXT:    j .LBB0_1
 ; CHECK-NEXT:  .LBB0_1: # %BB1
 ; CHECK-NEXT:    # =>This Inner Loop Header: Depth=1
 ; CHECK-NEXT:    li a0, 0
 ; CHECK-NEXT:    sd a0, 8(sp) # 8-byte Folded Spill
 ; CHECK-NEXT:    j .LBB0_1
----------------
mikhailramalho wrote:

@preames I saw you added this test case to check for a live interval crash when it runs in unreachable blocks, but if this patch lands, the unreachable block is gone. Should I try to rework the test? Maybe disable branch folding via the cmd line

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


More information about the llvm-commits mailing list