blob: 5c120ea65c893103d14c187620615ed70ddd55fd [file] [log] [blame]
Rafael Espindolafb6abd72006-10-10 14:26:06 +00001; RUN: llvm-as < %s | llc -march=arm &&
2; RUN: llvm-as < %s | llc -march=arm | grep movlt &&
3; RUN: llvm-as < %s | llc -march=arm | grep moveq &&
4; RUN: llvm-as < %s | llc -march=arm | grep movgt &&
5; RUN: llvm-as < %s | llc -march=arm | grep movge &&
Rafael Espindola0d9fe762006-10-10 16:33:47 +00006; RUN: llvm-as < %s | llc -march=arm | grep movle &&
7; RUN: llvm-as < %s | llc -march=arm | grep fcmpes &&
Rafael Espindola42b62f32006-10-13 13:14:59 +00008; RUN: llvm-as < %s | llc -march=arm | grep fcmps &&
9; RUN: llvm-as < %s | llc -march=arm | grep fcmped &&
10; RUN: llvm-as < %s | llc -march=arm | grep fcmpd
Rafael Espindolafb6abd72006-10-10 14:26:06 +000011
12int %f1(float %a) {
13entry:
14 %tmp = setlt float %a, 1.000000e+00 ; <bool> [#uses=1]
15 %tmp = cast bool %tmp to int ; <int> [#uses=1]
16 ret int %tmp
17}
18
19int %f2(float %a) {
20entry:
21 %tmp = seteq float %a, 1.000000e+00 ; <bool> [#uses=1]
22 %tmp = cast bool %tmp to int ; <int> [#uses=1]
23 ret int %tmp
24}
25
26int %f3(float %a) {
27entry:
28 %tmp = setgt float %a, 1.000000e+00 ; <bool> [#uses=1]
29 %tmp = cast bool %tmp to int ; <int> [#uses=1]
30 ret int %tmp
31}
32
33int %f4(float %a) {
34entry:
35 %tmp = setge float %a, 1.000000e+00 ; <bool> [#uses=1]
36 %tmp = cast bool %tmp to int ; <int> [#uses=1]
37 ret int %tmp
38}
39
40int %f5(float %a) {
41entry:
42 %tmp = setle float %a, 1.000000e+00 ; <bool> [#uses=1]
43 %tmp = cast bool %tmp to int ; <int> [#uses=1]
44 ret int %tmp
45}
Rafael Espindola0d9fe762006-10-10 16:33:47 +000046
Rafael Espindola42b62f32006-10-13 13:14:59 +000047int %f6(float %a) {
48entry:
49 %tmp = setne float %a, 1.000000e+00 ; <bool> [#uses=1]
50 %tmp = cast bool %tmp to int ; <int> [#uses=1]
51 ret int %tmp
52}
53
Rafael Espindola0d9fe762006-10-10 16:33:47 +000054int %g1(double %a) {
55entry:
56 %tmp = setlt double %a, 1.000000e+00 ; <bool> [#uses=1]
57 %tmp = cast bool %tmp to int ; <int> [#uses=1]
58 ret int %tmp
59}
Rafael Espindola42b62f32006-10-13 13:14:59 +000060
61int %g2(double %a) {
62entry:
63 %tmp = setne double %a, 1.000000e+00 ; <bool> [#uses=1]
64 %tmp = cast bool %tmp to int ; <int> [#uses=1]
65 ret int %tmp
66}