blob: ce0f4029589d54fc40c96fd7943b5360c363cd7a [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 movmi %t
3; RUN: grep moveq %t
4; RUN: grep movgt %t
5; RUN: grep movge %t
6; RUN: grep movne %t
Dan Gohman8c89a502007-08-15 13:36:28 +00007; RUN: grep fcmped %t | count 1
8; RUN: grep fcmpes %t | count 6
Dan Gohmanf17a25c2007-07-18 16:29:46 +00009
Tanya Lattner246a1372008-02-17 20:02:20 +000010define i32 @f1(float %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000011entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000012 %tmp = fcmp olt float %a, 1.000000e+00 ; <i1> [#uses=1]
13 %tmp1 = zext i1 %tmp to i32 ; <i32> [#uses=1]
14 ret i32 %tmp1
Dan Gohmanf17a25c2007-07-18 16:29:46 +000015}
16
Tanya Lattner246a1372008-02-17 20:02:20 +000017define i32 @f2(float %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000018entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000019 %tmp = fcmp oeq float %a, 1.000000e+00 ; <i1> [#uses=1]
20 %tmp2 = zext i1 %tmp to i32 ; <i32> [#uses=1]
21 ret i32 %tmp2
Dan Gohmanf17a25c2007-07-18 16:29:46 +000022}
23
Tanya Lattner246a1372008-02-17 20:02:20 +000024define i32 @f3(float %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000025entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000026 %tmp = fcmp ogt float %a, 1.000000e+00 ; <i1> [#uses=1]
27 %tmp3 = zext i1 %tmp to i32 ; <i32> [#uses=1]
28 ret i32 %tmp3
Dan Gohmanf17a25c2007-07-18 16:29:46 +000029}
30
Tanya Lattner246a1372008-02-17 20:02:20 +000031define i32 @f4(float %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000032entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000033 %tmp = fcmp oge float %a, 1.000000e+00 ; <i1> [#uses=1]
34 %tmp4 = zext i1 %tmp to i32 ; <i32> [#uses=1]
35 ret i32 %tmp4
Dan Gohmanf17a25c2007-07-18 16:29:46 +000036}
37
Tanya Lattner246a1372008-02-17 20:02:20 +000038define i32 @f5(float %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000039entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000040 %tmp = fcmp ole float %a, 1.000000e+00 ; <i1> [#uses=1]
41 %tmp5 = zext i1 %tmp to i32 ; <i32> [#uses=1]
42 ret i32 %tmp5
Dan Gohmanf17a25c2007-07-18 16:29:46 +000043}
44
Tanya Lattner246a1372008-02-17 20:02:20 +000045define i32 @f6(float %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000046entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000047 %tmp = fcmp une float %a, 1.000000e+00 ; <i1> [#uses=1]
48 %tmp6 = zext i1 %tmp to i32 ; <i32> [#uses=1]
49 ret i32 %tmp6
Dan Gohmanf17a25c2007-07-18 16:29:46 +000050}
51
Tanya Lattner246a1372008-02-17 20:02:20 +000052define i32 @g1(double %a) {
Dan Gohmanf17a25c2007-07-18 16:29:46 +000053entry:
Tanya Lattner246a1372008-02-17 20:02:20 +000054 %tmp = fcmp olt double %a, 1.000000e+00 ; <i1> [#uses=1]
55 %tmp7 = zext i1 %tmp to i32 ; <i32> [#uses=1]
56 ret i32 %tmp7
Dan Gohmanf17a25c2007-07-18 16:29:46 +000057}