Home | History | Annotate | Download | only in PowerPC
      1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
      2 ; RUN: llc -O0 -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
      3 
      4 ; xscvdpsxds should NOT be emitted, since it saturates the result down to i64.
      5 ; We can't use friz here because it may return -0.0 where the original code doesn't.
      6 
      7 define float @f_i128_f(float %v) {
      8 ; CHECK-LABEL: f_i128_f:
      9 ; CHECK:       # %bb.0: # %entry
     10 ; CHECK-NEXT:    mflr 0
     11 ; CHECK-NEXT:    std 0, 16(1)
     12 ; CHECK-NEXT:    stdu 1, -32(1)
     13 ; CHECK-NEXT:    .cfi_def_cfa_offset 32
     14 ; CHECK-NEXT:    .cfi_offset lr, 16
     15 ; CHECK-NEXT:    bl __fixsfti
     16 ; CHECK-NEXT:    nop
     17 ; CHECK-NEXT:    bl __floattisf
     18 ; CHECK-NEXT:    nop
     19 ; CHECK-NEXT:    addi 1, 1, 32
     20 ; CHECK-NEXT:    ld 0, 16(1)
     21 ; CHECK-NEXT:    mtlr 0
     22 ; CHECK-NEXT:    blr
     23 entry:
     24   %a = fptosi float %v to i128
     25   %b = sitofp i128 %a to float
     26   ret float %b
     27 }
     28 
     29 ; NSZ, so it's safe to friz.
     30 
     31 define float @f_i128_fi_nsz(float %v) #0 {
     32 ; CHECK-LABEL: f_i128_fi_nsz:
     33 ; CHECK:       # %bb.0: # %entry
     34 ; CHECK-NEXT:    friz 1, 1
     35 ; CHECK-NEXT:    blr
     36 entry:
     37   %a = fptosi float %v to i128
     38   %b = sitofp i128 %a to float
     39   ret float %b
     40 }
     41 
     42 attributes #0 = { "no-signed-zeros-fp-math"="true" }
     43 
     44