1 ; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s --check-prefix=CHECK-VFP
2 ; RUN: llc < %s -mtriple=arm-apple-darwin | FileCheck %s
4 define float @f1(double %x) {
6 ;CHECK-VFP: vcvt.f32.f64
10 %tmp1 = fptrunc double %x to float ; <float> [#uses=1]
14 define double @f2(float %x) {
16 ;CHECK-VFP: vcvt.f64.f32
20 %tmp1 = fpext float %x to double ; <double> [#uses=1]
24 define i32 @f3(float %x) {
26 ;CHECK-VFP: vcvt.s32.f32
30 %tmp = fptosi float %x to i32 ; <i32> [#uses=1]
34 define i32 @f4(float %x) {
36 ;CHECK-VFP: vcvt.u32.f32
40 %tmp = fptoui float %x to i32 ; <i32> [#uses=1]
44 define i32 @f5(double %x) {
46 ;CHECK-VFP: vcvt.s32.f64
50 %tmp = fptosi double %x to i32 ; <i32> [#uses=1]
54 define i32 @f6(double %x) {
56 ;CHECK-VFP: vcvt.u32.f64
60 %tmp = fptoui double %x to i32 ; <i32> [#uses=1]
64 define float @f7(i32 %a) {
66 ;CHECK-VFP: vcvt.f32.s32
70 %tmp = sitofp i32 %a to float ; <float> [#uses=1]
74 define double @f8(i32 %a) {
76 ;CHECK-VFP: vcvt.f64.s32
80 %tmp = sitofp i32 %a to double ; <double> [#uses=1]
84 define float @f9(i32 %a) {
86 ;CHECK-VFP: vcvt.f32.u32
90 %tmp = uitofp i32 %a to float ; <float> [#uses=1]
94 define double @f10(i32 %a) {
96 ;CHECK-VFP: vcvt.f64.u32
100 %tmp = uitofp i32 %a to double ; <double> [#uses=1]