blob: 64349d650e978c17af4bfa8c36797d29ad59d339 [file] [log] [blame]
Bob Wilson9f6c4c12010-02-18 06:05:53 +00001; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s
2
3define float @fmin_ole(float %x) nounwind {
4;CHECK: fmin_ole:
5;CHECK: vmin.f32
6 %cond = fcmp ole float 1.0, %x
7 %min1 = select i1 %cond, float 1.0, float %x
8 ret float %min1
9}
10
11define float @fmin_ult(float %x) nounwind {
12;CHECK: fmin_ult:
13;CHECK: vmin.f32
14 %cond = fcmp ult float %x, 1.0
15 %min1 = select i1 %cond, float %x, float 1.0
16 ret float %min1
17}
18
19define float @fmax_ogt(float %x) nounwind {
20;CHECK: fmax_ogt:
21;CHECK: vmax.f32
22 %cond = fcmp ogt float 1.0, %x
23 %max1 = select i1 %cond, float 1.0, float %x
24 ret float %max1
25}
26
27define float @fmax_uge(float %x) nounwind {
28;CHECK: fmax_uge:
29;CHECK: vmax.f32
30 %cond = fcmp uge float %x, 1.0
31 %max1 = select i1 %cond, float %x, float 1.0
32 ret float %max1
33}
34
35define float @fmax_olt_reverse(float %x) nounwind {
36;CHECK: fmax_olt_reverse:
37;CHECK: vmax.f32
38 %cond = fcmp olt float %x, 1.0
39 %max1 = select i1 %cond, float 1.0, float %x
40 ret float %max1
41}
42
43define float @fmax_ule_reverse(float %x) nounwind {
44;CHECK: fmax_ule_reverse:
45;CHECK: vmax.f32
46 %cond = fcmp ult float 1.0, %x
47 %max1 = select i1 %cond, float %x, float 1.0
48 ret float %max1
49}
50
51define float @fmin_oge_reverse(float %x) nounwind {
52;CHECK: fmin_oge_reverse:
53;CHECK: vmin.f32
54 %cond = fcmp oge float %x, 1.0
55 %min1 = select i1 %cond, float 1.0, float %x
56 ret float %min1
57}
58
59define float @fmin_ugt_reverse(float %x) nounwind {
60;CHECK: fmin_ugt_reverse:
61;CHECK: vmin.f32
62 %cond = fcmp ugt float 1.0, %x
63 %min1 = select i1 %cond, float %x, float 1.0
64 ret float %min1
65}