Home | History | Annotate | Download | only in SystemZ
      1 ; Test conversions of unsigned i32s to floating-point values (z10 only).
      2 ;
      3 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 | FileCheck %s
      4 
      5 ; Check i32->f32.  There is no native instruction, so we must promote
      6 ; to i64 first.
      7 define float @f1(i32 %i) {
      8 ; CHECK-LABEL: f1:
      9 ; CHECK: llgfr [[REGISTER:%r[0-5]]], %r2
     10 ; CHECK: cegbr %f0, [[REGISTER]]
     11 ; CHECK: br %r14
     12   %conv = uitofp i32 %i to float
     13   ret float %conv
     14 }
     15 
     16 ; Check i32->f64.
     17 define double @f2(i32 %i) {
     18 ; CHECK-LABEL: f2:
     19 ; CHECK: llgfr [[REGISTER:%r[0-5]]], %r2
     20 ; CHECK: cdgbr %f0, [[REGISTER]]
     21 ; CHECK: br %r14
     22   %conv = uitofp i32 %i to double
     23   ret double %conv
     24 }
     25 
     26 ; Check i32->f128.
     27 define void @f3(i32 %i, fp128 *%dst) {
     28 ; CHECK-LABEL: f3:
     29 ; CHECK: llgfr [[REGISTER:%r[0-5]]], %r2
     30 ; CHECK: cxgbr %f0, [[REGISTER]]
     31 ; CHECK: std %f0, 0(%r3)
     32 ; CHECK: std %f2, 8(%r3)
     33 ; CHECK: br %r14
     34   %conv = uitofp i32 %i to fp128
     35   store fp128 %conv, fp128 *%dst
     36   ret void
     37 }
     38