Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc < %s -mtriple=arm-apple-ios -mattr=+vfp2 | FileCheck %s
      2 
      3 define float @f1(float %a, float %b) {
      4 ;CHECK-LABEL: f1:
      5 ;CHECK: vadd.f32
      6 entry:
      7 	%tmp = fadd float %a, %b		; <float> [#uses=1]
      8 	ret float %tmp
      9 }
     10 
     11 define double @f2(double %a, double %b) {
     12 ;CHECK-LABEL: f2:
     13 ;CHECK: vadd.f64
     14 entry:
     15 	%tmp = fadd double %a, %b		; <double> [#uses=1]
     16 	ret double %tmp
     17 }
     18 
     19 define float @f3(float %a, float %b) {
     20 ;CHECK-LABEL: f3:
     21 ;CHECK: vmul.f32
     22 entry:
     23 	%tmp = fmul float %a, %b		; <float> [#uses=1]
     24 	ret float %tmp
     25 }
     26 
     27 define double @f4(double %a, double %b) {
     28 ;CHECK-LABEL: f4:
     29 ;CHECK: vmul.f64
     30 entry:
     31 	%tmp = fmul double %a, %b		; <double> [#uses=1]
     32 	ret double %tmp
     33 }
     34 
     35 define float @f5(float %a, float %b) {
     36 ;CHECK-LABEL: f5:
     37 ;CHECK: vsub.f32
     38 entry:
     39 	%tmp = fsub float %a, %b		; <float> [#uses=1]
     40 	ret float %tmp
     41 }
     42 
     43 define double @f6(double %a, double %b) {
     44 ;CHECK-LABEL: f6:
     45 ;CHECK: vsub.f64
     46 entry:
     47 	%tmp = fsub double %a, %b		; <double> [#uses=1]
     48 	ret double %tmp
     49 }
     50 
     51 define float @f7(float %a) {
     52 ;CHECK-LABEL: f7:
     53 ;CHECK: eor
     54 entry:
     55 	%tmp1 = fsub float -0.000000e+00, %a		; <float> [#uses=1]
     56 	ret float %tmp1
     57 }
     58 
     59 define double @f8(double %a) {
     60 ;CHECK-LABEL: f8:
     61 ;CHECK: vneg.f64
     62 entry:
     63 	%tmp1 = fsub double -0.000000e+00, %a		; <double> [#uses=1]
     64 	ret double %tmp1
     65 }
     66 
     67 define float @f9(float %a, float %b) {
     68 ;CHECK-LABEL: f9:
     69 ;CHECK: vdiv.f32
     70 entry:
     71 	%tmp1 = fdiv float %a, %b		; <float> [#uses=1]
     72 	ret float %tmp1
     73 }
     74 
     75 define double @f10(double %a, double %b) {
     76 ;CHECK-LABEL: f10:
     77 ;CHECK: vdiv.f64
     78 entry:
     79 	%tmp1 = fdiv double %a, %b		; <double> [#uses=1]
     80 	ret double %tmp1
     81 }
     82 
     83 define float @f11(float %a) {
     84 ;CHECK-LABEL: f11:
     85 ;CHECK: bic
     86 entry:
     87 	%tmp1 = call float @fabsf( float %a ) readnone	; <float> [#uses=1]
     88 	ret float %tmp1
     89 }
     90 
     91 declare float @fabsf(float)
     92 
     93 define double @f12(double %a) {
     94 ;CHECK-LABEL: f12:
     95 ;CHECK: vabs.f64
     96 entry:
     97 	%tmp1 = call double @fabs( double %a ) readnone	; <double> [#uses=1]
     98 	ret double %tmp1
     99 }
    100 
    101 declare double @fabs(double)
    102