2008-02-17 20:02:20 +00:00
|
|
|
; RUN: llvm-as < %s | llc -march=arm -mattr=+vfp2 > %t
|
2007-04-16 17:36:08 +00:00
|
|
|
; RUN: grep fcvtsd %t
|
|
|
|
; RUN: grep fcvtds %t
|
|
|
|
; RUN: grep ftosizs %t
|
|
|
|
; RUN: grep ftouizs %t
|
|
|
|
; RUN: grep ftosizd %t
|
|
|
|
; RUN: grep ftouizd %t
|
|
|
|
; RUN: grep fsitos %t
|
|
|
|
; RUN: grep fsitod %t
|
|
|
|
; RUN: grep fuitos %t
|
|
|
|
; RUN: grep fuitod %t
|
2006-10-09 17:50:29 +00:00
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define float @f1(double %x) {
|
2006-10-09 17:50:29 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp1 = fptrunc double %x to float ; <float> [#uses=1]
|
2006-10-09 17:50:29 +00:00
|
|
|
ret float %tmp1
|
|
|
|
}
|
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define double @f2(float %x) {
|
2006-10-09 17:50:29 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp1 = fpext float %x to double ; <double> [#uses=1]
|
2006-10-09 17:50:29 +00:00
|
|
|
ret double %tmp1
|
|
|
|
}
|
2006-10-10 18:55:14 +00:00
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define i32 @f3(float %x) {
|
2006-10-10 18:55:14 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp = fptosi float %x to i32 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp
|
2006-10-10 18:55:14 +00:00
|
|
|
}
|
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define i32 @f4(float %x) {
|
2006-10-10 18:55:14 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp = fptoui float %x to i32 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp
|
2006-10-10 18:55:14 +00:00
|
|
|
}
|
2006-10-10 20:38:57 +00:00
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define i32 @f5(double %x) {
|
2006-10-10 20:38:57 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp = fptosi double %x to i32 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp
|
2006-10-10 20:38:57 +00:00
|
|
|
}
|
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define i32 @f6(double %x) {
|
2006-10-10 20:38:57 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp = fptoui double %x to i32 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp
|
2006-10-10 20:38:57 +00:00
|
|
|
}
|
2006-10-17 20:20:07 +00:00
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define float @f7(i32 %a) {
|
2006-10-17 20:20:07 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp = sitofp i32 %a to float ; <float> [#uses=1]
|
2006-10-17 20:20:07 +00:00
|
|
|
ret float %tmp
|
|
|
|
}
|
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define double @f8(i32 %a) {
|
2006-10-17 20:20:07 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp = sitofp i32 %a to double ; <double> [#uses=1]
|
|
|
|
ret double %tmp
|
2006-10-17 20:20:07 +00:00
|
|
|
}
|
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define float @f9(i32 %a) {
|
2006-10-17 20:20:07 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp = uitofp i32 %a to float ; <float> [#uses=1]
|
2006-10-17 20:20:07 +00:00
|
|
|
ret float %tmp
|
|
|
|
}
|
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define double @f10(i32 %a) {
|
2006-10-17 20:20:07 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp = uitofp i32 %a to double ; <double> [#uses=1]
|
2006-10-17 20:20:07 +00:00
|
|
|
ret double %tmp
|
|
|
|
}
|