Home | History | Annotate | Download | only in SystemZ
      1 ; Test conversion of floating-point values to signed i64s.
      2 ;
      3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
      4 
      5 ; Test f32->i64.
      6 define i64 @f1(float %f) {
      7 ; CHECK-LABEL: f1:
      8 ; CHECK: cgebr %r2, 5, %f0
      9 ; CHECK: br %r14
     10   %conv = fptosi float %f to i64
     11   ret i64 %conv
     12 }
     13 
     14 ; Test f64->i64.
     15 define i64 @f2(double %f) {
     16 ; CHECK-LABEL: f2:
     17 ; CHECK: cgdbr %r2, 5, %f0
     18 ; CHECK: br %r14
     19   %conv = fptosi double %f to i64
     20   ret i64 %conv
     21 }
     22 
     23 ; Test f128->i64.
     24 define i64 @f3(fp128 *%src) {
     25 ; CHECK-LABEL: f3:
     26 ; CHECK: ld %f0, 0(%r2)
     27 ; CHECK: ld %f2, 8(%r2)
     28 ; CHECK: cgxbr %r2, 5, %f0
     29 ; CHECK: br %r14
     30   %f = load fp128 , fp128 *%src
     31   %conv = fptosi fp128 %f to i64
     32   ret i64 %conv
     33 }
     34