2011-09-21 19:36:30 +02:00
|
|
|
; RUN: llc -march=mips -mattr=single-float < %s | FileCheck %s
|
2008-08-08 06:05:51 +02:00
|
|
|
|
|
|
|
define double @int2fp(i32 %a) nounwind {
|
|
|
|
entry:
|
2011-09-21 19:36:30 +02:00
|
|
|
; CHECK: int2fp
|
|
|
|
; CHECK: __floatsidf
|
2008-08-08 06:05:51 +02:00
|
|
|
sitofp i32 %a to double ; <double>:0 [#uses=1]
|
|
|
|
ret double %0
|
|
|
|
}
|
|
|
|
|
|
|
|
define double @uint2double(i32 %a) nounwind {
|
|
|
|
entry:
|
2011-09-21 19:36:30 +02:00
|
|
|
; CHECK: uint2double
|
|
|
|
; CHECK: __floatunsidf
|
2008-08-08 06:05:51 +02:00
|
|
|
uitofp i32 %a to double ; <double>:0 [#uses=1]
|
|
|
|
ret double %0
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32 @double2int(double %a) nounwind {
|
|
|
|
entry:
|
2011-09-21 19:36:30 +02:00
|
|
|
; CHECK: double2int
|
|
|
|
; CHECK: __fixdfsi
|
2008-08-08 06:05:51 +02:00
|
|
|
fptosi double %a to i32 ; <i32>:0 [#uses=1]
|
|
|
|
ret i32 %0
|
|
|
|
}
|
|
|
|
|
|
|
|
define i32 @double2uint(double %a) nounwind {
|
|
|
|
entry:
|
2011-09-21 19:36:30 +02:00
|
|
|
; CHECK: double2uint
|
|
|
|
; CHECK: __fixunsdfsi
|
2008-08-08 06:05:51 +02:00
|
|
|
fptoui double %a to i32 ; <i32>:0 [#uses=1]
|
|
|
|
ret i32 %0
|
|
|
|
}
|
|
|
|
|