1 ; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s 2 3 define 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 11 define float @fmin_ole_zero(float %x) nounwind { 12 ;CHECK: fmin_ole_zero: 13 ;CHECK-NOT: vmin.f32 14 %cond = fcmp ole float 0.0, %x 15 %min1 = select i1 %cond, float 0.0, float %x 16 ret float %min1 17 } 18 19 define float @fmin_ult(float %x) nounwind { 20 ;CHECK: fmin_ult: 21 ;CHECK: vmin.f32 22 %cond = fcmp ult float %x, 1.0 23 %min1 = select i1 %cond, float %x, float 1.0 24 ret float %min1 25 } 26 27 define float @fmax_ogt(float %x) nounwind { 28 ;CHECK: fmax_ogt: 29 ;CHECK: vmax.f32 30 %cond = fcmp ogt float 1.0, %x 31 %max1 = select i1 %cond, float 1.0, float %x 32 ret float %max1 33 } 34 35 define float @fmax_uge(float %x) nounwind { 36 ;CHECK: fmax_uge: 37 ;CHECK: vmax.f32 38 %cond = fcmp uge float %x, 1.0 39 %max1 = select i1 %cond, float %x, float 1.0 40 ret float %max1 41 } 42 43 define float @fmax_uge_zero(float %x) nounwind { 44 ;CHECK: fmax_uge_zero: 45 ;CHECK-NOT: vmax.f32 46 %cond = fcmp uge float %x, 0.0 47 %max1 = select i1 %cond, float %x, float 0.0 48 ret float %max1 49 } 50 51 define float @fmax_olt_reverse(float %x) nounwind { 52 ;CHECK: fmax_olt_reverse: 53 ;CHECK: vmax.f32 54 %cond = fcmp olt float %x, 1.0 55 %max1 = select i1 %cond, float 1.0, float %x 56 ret float %max1 57 } 58 59 define float @fmax_ule_reverse(float %x) nounwind { 60 ;CHECK: fmax_ule_reverse: 61 ;CHECK: vmax.f32 62 %cond = fcmp ult float 1.0, %x 63 %max1 = select i1 %cond, float %x, float 1.0 64 ret float %max1 65 } 66 67 define float @fmin_oge_reverse(float %x) nounwind { 68 ;CHECK: fmin_oge_reverse: 69 ;CHECK: vmin.f32 70 %cond = fcmp oge float %x, 1.0 71 %min1 = select i1 %cond, float 1.0, float %x 72 ret float %min1 73 } 74 75 define float @fmin_ugt_reverse(float %x) nounwind { 76 ;CHECK: fmin_ugt_reverse: 77 ;CHECK: vmin.f32 78 %cond = fcmp ugt float 1.0, %x 79 %min1 = select i1 %cond, float %x, float 1.0 80 ret float %min1 81 } 82