; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
; RUN: llc -mtriple=riscv64 -O0 < %s | FileCheck %s
; Make sure we don't run LiveIntervals at O0, otherwise it will crash when
; running on this unreachable block.
define i16 @f() {
; CHECK-LABEL: 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
; CHECK-NEXT: # %bb.2: # %BB1
; CHECK-NEXT: li a0, 0
; CHECK-NEXT: bnez a0, .LBB0_1
; CHECK-NEXT: j .LBB0_3
; CHECK-NEXT: .LBB0_3: # %BB2
; CHECK-NEXT: ld a0, 8(sp) # 8-byte Folded Reload
; CHECK-NEXT: addi sp, sp, 16
; CHECK-NEXT: ret
BB:
br label %BB1
BB1:
%A = or i16 0, 0
%B = fcmp true float 0.000000e+00, 0.000000e+00
%C = or i1 %B, false
br i1 %C, label %BB1, label %BB2
BB2:
ret i16 %A
}