1; RUN: llc -mtriple=riscv32 < %s 2>&1 \ 2; RUN: | FileCheck -check-prefix=DEFAULT %s 3; RUN: not --crash llc -mtriple=riscv32 -target-abi ilp32 < %s 2>&1 \ 4; RUN: | FileCheck -check-prefix=RV32IF-ILP32 %s 5; RUN: llc -mtriple=riscv32 -target-abi ilp32f < %s 2>&1 \ 6; RUN: | FileCheck -check-prefix=RV32IF-ILP32F %s 7; RUN: llc -mtriple=riscv32 -filetype=obj < %s | llvm-readelf -h - | FileCheck -check-prefixes=FLAGS %s 8 9; RV32IF-ILP32: -target-abi option != target-abi module flag 10 11; FLAGS: Flags: 0x0 12; // this should be "Flags :0x2, single-float ABI", it will be fixed later. 13 14define float @foo(i32 %a) nounwind #0 { 15; DEFAULT: # %bb.0: 16; DEFAULT-NEXT: fcvt.s.w fa0, a0 17; DEFAULT-NEXT: ret 18; RV32IF-ILP32F: # %bb.0: 19; RV32IF-ILP32F: fcvt.s.w fa0, a0 20; RV32IF-ILP32F: ret 21 %conv = sitofp i32 %a to float 22 ret float %conv 23} 24 25attributes #0 = { "target-features"="+f"} 26!llvm.module.flags = !{!0} 27!0 = !{i32 1, !"target-abi", !"ilp32f"} 28