blob: 0e3f62046eb80989d8a11a09f70fe7fa48614a70 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
; RUN: llc -mtriple=riscv32 < %s 2>&1 \
; RUN: | FileCheck -check-prefix=DEFAULT %s
; RUN: llc -mtriple=riscv32 -target-abi ilp32 < %s 2>&1 \
; RUN: | FileCheck -check-prefix=RV32IF-ILP32 %s
; RUN: not --crash llc -mtriple=riscv32 -target-abi ilp32f < %s 2>&1 \
; RUN: | FileCheck -check-prefix=RV32IF-ILP32F %s
; RUN: llc -mtriple=riscv32 -filetype=obj < %s | llvm-readelf -h - | FileCheck -check-prefixes=FLAGS %s
; RV32IF-ILP32F: -target-abi option != target-abi module flag
; FLAGS: Flags: 0x0
define float @foo(i32 %a) nounwind #0 {
; DEFAULT: # %bb.0:
; DEFAULT: fmv.x.w a0, fa5
; RV32IF-ILP32: # %bb.0:
; RV32IF-ILP32: fmv.x.w a0, fa5
%conv = sitofp i32 %a to float
ret float %conv
}
attributes #0 = { "target-features"="+f"}
!llvm.module.flags = !{!0}
!0 = !{i32 1, !"target-abi", !"ilp32"}
|