blob: f16c9d46bc99b927c4e5410bdae338e612a2c15d [file] [log] [blame]
Reid Spencereb1d74e2007-04-16 17:36:08 +00001; RUN: llvm-upgrade < %s | llvm-as | llc -march=arm -mattr=+vfp2 > %t
2; 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 Gohman28beeea2007-08-15 13:36:28 +00007; RUN: grep fcmped %t | count 1
8; RUN: grep fcmpes %t | count 6
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}