brintos

brintos / llvm-project-archived public Read only

0
0
Text · 738 B · 5893ae2 Raw
21 lines · plain
1; RUN: llc -mtriple=riscv32 -target-abi ilp32 < %s 2>&1 \2; RUN:   | FileCheck -check-prefix=RV32IF-ILP32 %s3; RUN: llc -mtriple=riscv32 -target-abi ilp32f < %s 2>&1 \4; RUN:   | FileCheck -check-prefix=RV32IF-ILP32F %s5; RUN: llc -mtriple=riscv32 -mattr=-f -target-abi ilp32f <%s 2>&1 \6; RUN:   | FileCheck -check-prefix=RV32I-ILP32F-FAILED %s7 8; RV32I-ILP32F-FAILED: Hard-float 'f' ABI can't be used for a target that doesn't support the F instruction set extension9 10 11define float @foo(i32 %a) nounwind #0 {12; RV32IF-ILP32: fcvt.s.w  fa5, a013; RV32IF-ILP32-NEXT: fmv.x.w a0, fa514; RV32IF-ILP32F: fcvt.s.w fa0, a015; RV32IF-ILP32F-NEXT: ret16  %conv = sitofp i32 %a to float17  ret float %conv18}19 20attributes #0 = { "target-features"="+f"}21