Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc < %s -march=arm -mattr=+vfp2 | FileCheck %s -check-prefix=VFP2
      2 ; RUN: llc < %s -march=arm -mattr=+neon | FileCheck %s -check-prefix=NFP0
      3 ; RUN: llc < %s -march=arm -mcpu=cortex-a8 | FileCheck %s -check-prefix=CORTEXA8
      4 ; RUN: llc < %s -march=arm -mcpu=cortex-a9 | FileCheck %s -check-prefix=CORTEXA9
      5 
      6 define float @test1(float* %a) {
      7 entry:
      8 	%0 = load float* %a, align 4		; <float> [#uses=2]
      9 	%1 = fsub float -0.000000e+00, %0		; <float> [#uses=2]
     10 	%2 = fpext float %1 to double		; <double> [#uses=1]
     11 	%3 = fcmp olt double %2, 1.234000e+00		; <i1> [#uses=1]
     12 	%retval = select i1 %3, float %1, float %0		; <float> [#uses=1]
     13 	ret float %retval
     14 }
     15 ; VFP2: test1:
     16 ; VFP2: 	vneg.f32	s{{.*}}, s{{.*}}
     17 
     18 ; NFP1: test1:
     19 ; NFP1: 	vneg.f32	d{{.*}}, d{{.*}}
     20 
     21 ; NFP0: test1:
     22 ; NFP0: 	vneg.f32	s{{.*}}, s{{.*}}
     23 
     24 ; CORTEXA8: test1:
     25 ; CORTEXA8: 	vneg.f32	d{{.*}}, d{{.*}}
     26 
     27 ; CORTEXA9: test1:
     28 ; CORTEXA9: 	vneg.f32	s{{.*}}, s{{.*}}
     29 
     30 define float @test2(float* %a) {
     31 entry:
     32 	%0 = load float* %a, align 4		; <float> [#uses=2]
     33 	%1 = fmul float -1.000000e+00, %0		; <float> [#uses=2]
     34 	%2 = fpext float %1 to double		; <double> [#uses=1]
     35 	%3 = fcmp olt double %2, 1.234000e+00		; <i1> [#uses=1]
     36 	%retval = select i1 %3, float %1, float %0		; <float> [#uses=1]
     37 	ret float %retval
     38 }
     39 ; VFP2: test2:
     40 ; VFP2: 	vneg.f32	s{{.*}}, s{{.*}}
     41 
     42 ; NFP1: test2:
     43 ; NFP1: 	vneg.f32	d{{.*}}, d{{.*}}
     44 
     45 ; NFP0: test2:
     46 ; NFP0: 	vneg.f32	s{{.*}}, s{{.*}}
     47 
     48 ; CORTEXA8: test2:
     49 ; CORTEXA8: 	vneg.f32	d{{.*}}, d{{.*}}
     50 
     51 ; CORTEXA9: test2:
     52 ; CORTEXA9: 	vneg.f32	s{{.*}}, s{{.*}}
     53 
     54