blob: 16e9a1b14050258c82b06ea25e5c8e02f293c31b [file] [log] [blame]
Rafael Espindolafb6abd72006-10-10 14:26:06 +00001; RUN: llvm-as < %s | llc -march=arm &&
Rafael Espindola6c5ae3e2006-10-14 13:42:53 +00002; RUN: llvm-as < %s | llc -march=arm | grep movmi &&
Rafael Espindolafb6abd72006-10-10 14:26:06 +00003; 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 Espindola6c5ae3e2006-10-14 13:42:53 +00006; RUN: llvm-as < %s | llc -march=arm | grep movls &&
Rafael Espindola42b62f32006-10-13 13:14:59 +00007; RUN: llvm-as < %s | llc -march=arm | grep fcmps &&
Rafael Espindola42b62f32006-10-13 13:14:59 +00008; RUN: llvm-as < %s | llc -march=arm | grep fcmpd
Rafael Espindolafb6abd72006-10-10 14:26:06 +00009
10int %f1(float %a) {
11entry:
12 %tmp = setlt float %a, 1.000000e+00 ; <bool> [#uses=1]
13 %tmp = cast bool %tmp to int ; <int> [#uses=1]
14 ret int %tmp
15}
16
17int %f2(float %a) {
18entry:
19 %tmp = seteq float %a, 1.000000e+00 ; <bool> [#uses=1]
20 %tmp = cast bool %tmp to int ; <int> [#uses=1]
21 ret int %tmp
22}
23
24int %f3(float %a) {
25entry:
26 %tmp = setgt float %a, 1.000000e+00 ; <bool> [#uses=1]
27 %tmp = cast bool %tmp to int ; <int> [#uses=1]
28 ret int %tmp
29}
30
31int %f4(float %a) {
32entry:
33 %tmp = setge float %a, 1.000000e+00 ; <bool> [#uses=1]
34 %tmp = cast bool %tmp to int ; <int> [#uses=1]
35 ret int %tmp
36}
37
38int %f5(float %a) {
39entry:
40 %tmp = setle float %a, 1.000000e+00 ; <bool> [#uses=1]
41 %tmp = cast bool %tmp to int ; <int> [#uses=1]
42 ret int %tmp
43}
Rafael Espindola0d9fe762006-10-10 16:33:47 +000044
Rafael Espindola42b62f32006-10-13 13:14:59 +000045int %f6(float %a) {
46entry:
47 %tmp = setne float %a, 1.000000e+00 ; <bool> [#uses=1]
48 %tmp = cast bool %tmp to int ; <int> [#uses=1]
49 ret int %tmp
50}
51
Rafael Espindola0d9fe762006-10-10 16:33:47 +000052int %g1(double %a) {
53entry:
54 %tmp = setlt double %a, 1.000000e+00 ; <bool> [#uses=1]
55 %tmp = cast bool %tmp to int ; <int> [#uses=1]
56 ret int %tmp
57}
Rafael Espindola42b62f32006-10-13 13:14:59 +000058
59int %g2(double %a) {
60entry:
61 %tmp = setne double %a, 1.000000e+00 ; <bool> [#uses=1]
62 %tmp = cast bool %tmp to int ; <int> [#uses=1]
63 ret int %tmp
64}