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 4 5define void @jt(i32 %in, i32* %out) nounwind { 6; RV32I-LABEL: jt: 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 36; RV32I-NEXT: ret 37entry: 38 switch i32 %in, label %exit [ 39 i32 1, label %bb1 40 i32 2, label %bb2 41 i32 3, label %bb3 42 i32 4, label %bb4 43 ] 44bb1: 45 store i32 4, i32* %out 46 br label %exit 47bb2: 48 store i32 3, i32* %out 49 br label %exit 50bb3: 51 store i32 2, i32* %out 52 br label %exit 53bb4: 54 store i32 1, i32* %out 55 br label %exit 56exit: 57 ret void 58} 59