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 movmi %t
|
|
|
|
; RUN: grep moveq %t
|
|
|
|
; RUN: grep movgt %t
|
|
|
|
; RUN: grep movge %t
|
|
|
|
; RUN: grep movne %t
|
2007-08-15 13:36:28 +00:00
|
|
|
; RUN: grep fcmped %t | count 1
|
|
|
|
; RUN: grep fcmpes %t | count 6
|
2006-10-10 14:26:06 +00:00
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define i32 @f1(float %a) {
|
2006-10-10 14:26:06 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp = fcmp olt float %a, 1.000000e+00 ; <i1> [#uses=1]
|
|
|
|
%tmp1 = zext i1 %tmp to i32 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp1
|
2006-10-10 14:26:06 +00:00
|
|
|
}
|
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define i32 @f2(float %a) {
|
2006-10-10 14:26:06 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp = fcmp oeq float %a, 1.000000e+00 ; <i1> [#uses=1]
|
|
|
|
%tmp2 = zext i1 %tmp to i32 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp2
|
2006-10-10 14:26:06 +00:00
|
|
|
}
|
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define i32 @f3(float %a) {
|
2006-10-10 14:26:06 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp = fcmp ogt float %a, 1.000000e+00 ; <i1> [#uses=1]
|
|
|
|
%tmp3 = zext i1 %tmp to i32 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp3
|
2006-10-10 14:26:06 +00:00
|
|
|
}
|
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define i32 @f4(float %a) {
|
2006-10-10 14:26:06 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp = fcmp oge float %a, 1.000000e+00 ; <i1> [#uses=1]
|
|
|
|
%tmp4 = zext i1 %tmp to i32 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp4
|
2006-10-10 14:26:06 +00:00
|
|
|
}
|
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define i32 @f5(float %a) {
|
2006-10-10 14:26:06 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp = fcmp ole float %a, 1.000000e+00 ; <i1> [#uses=1]
|
|
|
|
%tmp5 = zext i1 %tmp to i32 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp5
|
2006-10-10 14:26:06 +00:00
|
|
|
}
|
2006-10-10 16:33:47 +00:00
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define i32 @f6(float %a) {
|
2006-10-13 13:14:59 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp = fcmp une float %a, 1.000000e+00 ; <i1> [#uses=1]
|
|
|
|
%tmp6 = zext i1 %tmp to i32 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp6
|
2006-10-13 13:14:59 +00:00
|
|
|
}
|
|
|
|
|
2008-02-17 20:02:20 +00:00
|
|
|
define i32 @g1(double %a) {
|
2006-10-10 16:33:47 +00:00
|
|
|
entry:
|
2008-02-17 20:02:20 +00:00
|
|
|
%tmp = fcmp olt double %a, 1.000000e+00 ; <i1> [#uses=1]
|
|
|
|
%tmp7 = zext i1 %tmp to i32 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp7
|
2006-10-10 16:33:47 +00:00
|
|
|
}
|