Home | History | Annotate | Download | only in AArch64
      1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
      2 ; RUN: llc -mtriple=aarch64-unknown-unknown < %s | FileCheck %s
      3 
      4 define float @trunc_unsigned_f32(float %x) #0 {
      5 ; CHECK-LABEL: trunc_unsigned_f32:
      6 ; CHECK:       // %bb.0:
      7 ; CHECK-NEXT:    frintz s0, s0
      8 ; CHECK-NEXT:    ret
      9   %i = fptoui float %x to i32
     10   %r = uitofp i32 %i to float
     11   ret float %r
     12 }
     13 
     14 define double @trunc_unsigned_f64(double %x) #0 {
     15 ; CHECK-LABEL: trunc_unsigned_f64:
     16 ; CHECK:       // %bb.0:
     17 ; CHECK-NEXT:    frintz d0, d0
     18 ; CHECK-NEXT:    ret
     19   %i = fptoui double %x to i64
     20   %r = uitofp i64 %i to double
     21   ret double %r
     22 }
     23 
     24 define float @trunc_signed_f32(float %x) #0 {
     25 ; CHECK-LABEL: trunc_signed_f32:
     26 ; CHECK:       // %bb.0:
     27 ; CHECK-NEXT:    frintz s0, s0
     28 ; CHECK-NEXT:    ret
     29   %i = fptosi float %x to i32
     30   %r = sitofp i32 %i to float
     31   ret float %r
     32 }
     33 
     34 define double @trunc_signed_f64(double %x) #0 {
     35 ; CHECK-LABEL: trunc_signed_f64:
     36 ; CHECK:       // %bb.0:
     37 ; CHECK-NEXT:    frintz d0, d0
     38 ; CHECK-NEXT:    ret
     39   %i = fptosi double %x to i64
     40   %r = sitofp i64 %i to double
     41   ret double %r
     42 }
     43 
     44 attributes #0 = { "no-signed-zeros-fp-math"="true" }
     45 
     46