1 ; RUN: llc -mtriple=riscv32 -target-abi ilp32 < %s 2>&1 \
2 ; RUN: | FileCheck -check-prefix=RV32IF-ILP32 %s
3 ; RUN: llc -mtriple=riscv32 -target-abi ilp32f < %s 2>&1 \
4 ; RUN: | FileCheck -check-prefix=RV32IF-ILP32F %s
5 ; RUN: llc -mtriple=riscv32 -mattr=-f -target-abi ilp32f <%s 2>&1 \
6 ; RUN: | FileCheck -check-prefix=RV32I-ILP32F-FAILED %s
8 ; RV32I-ILP32F-FAILED: Hard-float 'f' ABI can't be used for a target that doesn't support the F instruction set extension
11 define float @foo(i32 %a) nounwind #0 {
12 ; RV32IF-ILP32: fcvt.s.w fa5, a0
13 ; RV32IF-ILP32-NEXT: fmv.x.w a0, fa5
14 ; RV32IF-ILP32F: fcvt.s.w fa0, a0
15 ; RV32IF-ILP32F-NEXT: ret
16 %conv = sitofp i32 %a to float
20 attributes #0 = { "target-features"="+f"}