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 i32 @bare_select(i1 %a, i32 %b, i32 %c) {
6; RV32I-LABEL: bare_select:
7; RV32I:       # %bb.0:
8; RV32I-NEXT:    andi a0, a0, 1
9; RV32I-NEXT:    bnez a0, .LBB0_2
10; RV32I-NEXT:  # %bb.1:
11; RV32I-NEXT:    mv a1, a2
12; RV32I-NEXT:  .LBB0_2:
13; RV32I-NEXT:    mv a0, a1
14; RV32I-NEXT:    ret
15  %1 = select i1 %a, i32 %b, i32 %c
16  ret i32 %1
17}
18
19define float @bare_select_float(i1 %a, float %b, float %c) {
20; RV32I-LABEL: bare_select_float:
21; RV32I:       # %bb.0:
22; RV32I-NEXT:    andi a0, a0, 1
23; RV32I-NEXT:    bnez a0, .LBB1_2
24; RV32I-NEXT:  # %bb.1:
25; RV32I-NEXT:    mv a1, a2
26; RV32I-NEXT:  .LBB1_2:
27; RV32I-NEXT:    mv a0, a1
28; RV32I-NEXT:    ret
29  %1 = select i1 %a, float %b, float %c
30  ret float %1
31}
32