brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · f2590b6 Raw
47 lines · plain
1; Test conversions of unsigned i64s to floating-point values (z10 only).2;3; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 | FileCheck %s4 5; Test i64->f16. For z10, this results in just a single a libcall.6define half @f0(i64 %i) {7; CHECK-LABEL: f0:8; CHECK: cegbr9; CHECK: aebr10; CHECK: brasl %r14, __truncsfhf2@PLT11; CHECK: br %r1412  %conv = uitofp i64 %i to half13  ret half %conv14}15 16; Test i64->f32.  There's no native support for unsigned i64-to-fp conversions,17; but we should be able to implement them using signed i64-to-fp conversions.18define float @f1(i64 %i) {19; CHECK-LABEL: f1:20; CHECK: cegbr21; CHECK: aebr22; CHECK: br %r1423  %conv = uitofp i64 %i to float24  ret float %conv25}26 27; Test i64->f64.28define double @f2(i64 %i) {29; CHECK-LABEL: f2:30; CHECK: ldgr31; CHECK: adbr32; CHECK: br %r1433  %conv = uitofp i64 %i to double34  ret double %conv35}36 37; Test i64->f128.38define void @f3(i64 %i, ptr %dst) {39; CHECK-LABEL: f3:40; CHECK: cxgbr41; CHECK: axbr42; CHECK: br %r1443  %conv = uitofp i64 %i to fp12844  store fp128 %conv, ptr %dst45  ret void46}47