Home | History | Annotate | Download | only in ARM
      1 ; RUN: llc -mtriple=armv7 < %s | FileCheck %s --check-prefix=CHECK-ARM --check-prefix=CHECK
      2 ; RUN: llc -mtriple=thumbv7 < %s | FileCheck %s --check-prefix=CHECK-THUMB --check-prefix=CHECK
      3 
      4 target datalayout = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64"
      5 target triple = "armv7--"
      6 
      7 define double @f(double %a) {
      8   ; CHECK-LABEL: f:
      9   ; CHECK: bfc r1, #31, #1
     10   ; CHECK-NEXT: bx lr
     11   %x = call double @llvm.fabs.f64(double %a) readnone
     12   ret double %x
     13 }
     14 
     15 define float @g(float %a) {
     16   ; CHECK-LABEL: g:
     17   ; CHECK-THUMB: bic r0, r0, #-2147483648
     18   ; CHECK-ARM: bfc r0, #31, #1
     19   ; CHECK-NEXT: bx lr
     20   %x = call float @llvm.fabs.f32(float %a) readnone
     21   ret float %x
     22 }
     23 
     24 define double @h(double %a) {
     25   ; CHECK-LABEL: h:
     26   ; CHECK: eor r1, r1, #-2147483648
     27   ; CHECK-NEXT: bx lr
     28   %x = fsub nsz double -0.0, %a
     29   ret double %x
     30 }
     31 
     32 define float @i(float %a) {
     33   ; CHECK-LABEL: i:
     34   ; CHECK: eor r0, r0, #-2147483648
     35   ; CHECK-NEXT: bx lr
     36   %x = fsub nsz float -0.0, %a
     37   ret float %x
     38 }
     39 
     40 declare double @llvm.fabs.f64(double) readnone
     41 declare float @llvm.fabs.f32(float) readnone
     42