blob: fd1322735b78c2395586323473f6b6debb5b11ed [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
12
Tanya Lattner246a1372008-02-17 20:02:20 +000013define float @f1(double %x) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000014entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000015 %tmp1 = fptrunc double %x to float ; <float> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000016 ret float %tmp1
17}
18
Tanya Lattner246a1372008-02-17 20:02:20 +000019define double @f2(float %x) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000020entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000021 %tmp1 = fpext float %x to double ; <double> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000022 ret double %tmp1
23}
24
Tanya Lattner246a1372008-02-17 20:02:20 +000025define i32 @f3(float %x) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000026entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000027 %tmp = fptosi float %x to i32 ; <i32> [#uses=1]
28 ret i32 %tmp
Dan Gohmanf17a25c2007-07-18 16:29:46 +000029}
30
Tanya Lattner246a1372008-02-17 20:02:20 +000031define i32 @f4(float %x) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000032entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000033 %tmp = fptoui float %x to i32 ; <i32> [#uses=1]
34 ret i32 %tmp
Dan Gohmanf17a25c2007-07-18 16:29:46 +000035}
36
Tanya Lattner246a1372008-02-17 20:02:20 +000037define i32 @f5(double %x) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000038entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000039 %tmp = fptosi double %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 @f6(double %x) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000044entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000045 %tmp = fptoui double %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 float @f7(i32 %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000050entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000051 %tmp = sitofp i32 %a to float ; <float> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000052 ret float %tmp
53}
54
Tanya Lattner246a1372008-02-17 20:02:20 +000055define double @f8(i32 %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000056entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000057 %tmp = sitofp i32 %a to double ; <double> [#uses=1]
58 ret double %tmp
Dan Gohmanf17a25c2007-07-18 16:29:46 +000059}
60
Tanya Lattner246a1372008-02-17 20:02:20 +000061define float @f9(i32 %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000062entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000063 %tmp = uitofp 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 @f10(i32 %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000068entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000069 %tmp = uitofp i32 %a to double ; <double> [#uses=1]
Dan Gohmanf17a25c2007-07-18 16:29:46 +000070 ret double %tmp
71}