1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2 ; RUN: llc -mtriple=riscv32 -verify-machineinstrs < %s \
3 ; RUN: | FileCheck %s -check-prefix=RV32I
5 define void @jt(i32 %in, i32* %out) nounwind {
7 ; RV32I: # %bb.0: # %entry
8 ; RV32I-NEXT: addi a2, zero, 2
9 ; RV32I-NEXT: blt a2, a0, .LBB0_4
10 ; RV32I-NEXT: # %bb.1: # %entry
11 ; RV32I-NEXT: addi a2, zero, 1
12 ; RV32I-NEXT: beq a0, a2, .LBB0_7
13 ; RV32I-NEXT: # %bb.2: # %entry
14 ; RV32I-NEXT: addi a2, zero, 2
15 ; RV32I-NEXT: bne a0, a2, .LBB0_10
16 ; RV32I-NEXT: # %bb.3: # %bb2
17 ; RV32I-NEXT: addi a0, zero, 3
18 ; RV32I-NEXT: j .LBB0_9
19 ; RV32I-NEXT: .LBB0_4: # %entry
20 ; RV32I-NEXT: addi a2, zero, 3
21 ; RV32I-NEXT: beq a0, a2, .LBB0_8
22 ; RV32I-NEXT: # %bb.5: # %entry
23 ; RV32I-NEXT: addi a2, zero, 4
24 ; RV32I-NEXT: bne a0, a2, .LBB0_10
25 ; RV32I-NEXT: # %bb.6: # %bb4
26 ; RV32I-NEXT: addi a0, zero, 1
27 ; RV32I-NEXT: j .LBB0_9
28 ; RV32I-NEXT: .LBB0_7: # %bb1
29 ; RV32I-NEXT: addi a0, zero, 4
30 ; RV32I-NEXT: j .LBB0_9
31 ; RV32I-NEXT: .LBB0_8: # %bb3
32 ; RV32I-NEXT: addi a0, zero, 2
33 ; RV32I-NEXT: .LBB0_9: # %exit
34 ; RV32I-NEXT: sw a0, 0(a1)
35 ; RV32I-NEXT: .LBB0_10: # %exit
38 switch i32 %in, label %exit [
45 store i32 4, i32* %out
48 store i32 3, i32* %out
51 store i32 2, i32* %out
54 store i32 1, i32* %out