1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
2; RUN: llc -mtriple=riscv32 -mattr=+f -verify-machineinstrs < %s \
3; RUN:   | FileCheck -check-prefix=RV32IF %s
4
5define float @float_imm() nounwind {
6; RV32IF-LABEL: float_imm:
7; RV32IF:       # %bb.0:
8; RV32IF-NEXT:    lui a0, 263313
9; RV32IF-NEXT:    addi a0, a0, -37
10; RV32IF-NEXT:    ret
11  ret float 3.14159274101257324218750
12}
13
14define float @float_imm_op(float %a) nounwind {
15; TODO: addi should be folded in to the flw
16; RV32IF-LABEL: float_imm_op:
17; RV32IF:       # %bb.0:
18; RV32IF-NEXT:    fmv.w.x ft0, a0
19; RV32IF-NEXT:    lui a0, %hi(.LCPI1_0)
20; RV32IF-NEXT:    addi a0, a0, %lo(.LCPI1_0)
21; RV32IF-NEXT:    flw ft1, 0(a0)
22; RV32IF-NEXT:    fadd.s ft0, ft0, ft1
23; RV32IF-NEXT:    fmv.x.w a0, ft0
24; RV32IF-NEXT:    ret
25  %1 = fadd float %a, 1.0
26  ret float %1
27}
28