blob: 23850075d0dc94987c1d4d1862b759d17bfcd1f8 [file] [log] [blame]
Tanya Lattner246a1372008-02-17 20:02:20 +00001; RUN: llvm-as < %s | llc -march=arm -mattr=+vfp2 > %t
Dan Gohmanf17a25c2007-07-18 16:29:46 +00002; RUN: grep fcvtsd %t
3; RUN: grep fcvtds %t
4; RUN: grep ftosizs %t
5; RUN: grep ftouizs %t
6; RUN: grep ftosizd %t
7; RUN: grep ftouizd %t
8; RUN: grep fsitos %t
9; RUN: grep fsitod %t
10; RUN: grep fuitos %t
11; RUN: grep fuitod %t
Evan Chenga8740032008-04-01 01:50:16 +000012; RUN: llvm-as < %s | llc -march=arm > %t
13; RUN: grep truncdfsf2 %t
14; RUN: grep extendsfdf2 %t
15; RUN: grep fixsfsi %t
16; RUN: grep fixunssfsi %t
17; RUN: grep fixdfsi %t
18; RUN: grep fixunsdfsi %t
Evan Chengf99a7752008-04-01 02:18:22 +000019; RUN: grep floatsisf %t
Evan Chenga8740032008-04-01 01:50:16 +000020; RUN: grep floatsidf %t
Evan Chengf99a7752008-04-01 02:18:22 +000021; RUN: grep floatunsisf %t
22; RUN: grep floatunsidf %t
Evan Chenga8740032008-04-01 01:50:16 +000023; RUN: llvm-as < %s | llc -march=thumb
Dan Gohmanf17a25c2007-07-18 16:29:46 +000024
Tanya Lattner246a1372008-02-17 20:02:20 +000025define float @f1(double %x) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000026entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000027 %tmp1 = fptrunc double %x to float ; <float> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000028 ret float %tmp1
29}
30
Tanya Lattner246a1372008-02-17 20:02:20 +000031define double @f2(float %x) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000032entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000033 %tmp1 = fpext float %x to double ; <double> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000034 ret double %tmp1
35}
36
Tanya Lattner246a1372008-02-17 20:02:20 +000037define i32 @f3(float %x) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000038entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000039 %tmp = fptosi float %x to i32 ; <i32> [#uses=1]
40 ret i32 %tmp
Dan Gohmanf17a25c2007-07-18 16:29:46 +000041}
42
Tanya Lattner246a1372008-02-17 20:02:20 +000043define i32 @f4(float %x) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000044entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000045 %tmp = fptoui float %x to i32 ; <i32> [#uses=1]
46 ret i32 %tmp
Dan Gohmanf17a25c2007-07-18 16:29:46 +000047}
48
Tanya Lattner246a1372008-02-17 20:02:20 +000049define i32 @f5(double %x) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000050entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000051 %tmp = fptosi double %x to i32 ; <i32> [#uses=1]
52 ret i32 %tmp
Dan Gohmanf17a25c2007-07-18 16:29:46 +000053}
54
Tanya Lattner246a1372008-02-17 20:02:20 +000055define i32 @f6(double %x) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000056entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000057 %tmp = fptoui double %x to i32 ; <i32> [#uses=1]
58 ret i32 %tmp
Dan Gohmanf17a25c2007-07-18 16:29:46 +000059}
60
Tanya Lattner246a1372008-02-17 20:02:20 +000061define float @f7(i32 %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000062entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000063 %tmp = sitofp i32 %a to float ; <float> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000064 ret float %tmp
65}
66
Tanya Lattner246a1372008-02-17 20:02:20 +000067define double @f8(i32 %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000068entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000069 %tmp = sitofp i32 %a to double ; <double> [#uses=1]
70 ret double %tmp
Dan Gohmanf17a25c2007-07-18 16:29:46 +000071}
72
Tanya Lattner246a1372008-02-17 20:02:20 +000073define float @f9(i32 %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000074entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000075 %tmp = uitofp i32 %a to float ; <float> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000076 ret float %tmp
77}
78
Tanya Lattner246a1372008-02-17 20:02:20 +000079define double @f10(i32 %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000080entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000081 %tmp = uitofp i32 %a to double ; <double> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000082 ret double %tmp
83}