Home | History | Annotate | Download | only in PowerPC
      1 ; RUN: llc < %s -mattr=-vsx -march=ppc32 -mtriple=powerpc-apple-darwin | FileCheck %s
      2 
      3 define double @fabs(double %f) {
      4 ; CHECK-LABEL: fabs:
      5 ; CHECK:       ; BB#0:
      6 ; CHECK-NEXT:    fabs f1, f1
      7 ; CHECK-NEXT:    blr
      8 ;
      9   %t = tail call double @fabs( double %f ) readnone
     10   ret double %t
     11 }
     12 
     13 define float @bitcast_fabs(float %x) {
     14 ; CHECK-LABEL: bitcast_fabs:
     15 ; CHECK:       ; BB#0:
     16 ; CHECK-NEXT:    stfs f1, -8(r1)
     17 ; CHECK-NEXT:    nop
     18 ; CHECK-NEXT:    nop
     19 ; CHECK-NEXT:    lwz r2, -8(r1)
     20 ; CHECK-NEXT:    clrlwi r2, r2, 1
     21 ; CHECK-NEXT:    stw r2, -4(r1)
     22 ; CHECK-NEXT:    lfs f1, -4(r1)
     23 ; CHECK-NEXT:    blr
     24 ;
     25   %bc1 = bitcast float %x to i32
     26   %and = and i32 %bc1, 2147483647
     27   %bc2 = bitcast i32 %and to float
     28   ret float %bc2
     29 }
     30 
     31