1; Test strict conversions of unsigned i64s to floating-point values (z10 only). 2; 3; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 | FileCheck %s 4 5declare float @llvm.experimental.constrained.uitofp.f32.i64(i64, metadata, metadata) 6declare double @llvm.experimental.constrained.uitofp.f64.i64(i64, metadata, metadata) 7declare fp128 @llvm.experimental.constrained.uitofp.f128.i64(i64, metadata, metadata) 8 9; Test i64->f32. There's no native support for unsigned i64-to-fp conversions, 10; but we should be able to implement them using signed i64-to-fp conversions. 11define float @f1(i64 %i) #0 { 12; CHECK-LABEL: f1: 13; CHECK: cegbr 14; CHECK: aebr 15; CHECK: br %r14 16 %conv = call float @llvm.experimental.constrained.uitofp.f32.i64(i64 %i, 17 metadata !"round.dynamic", 18 metadata !"fpexcept.strict") #0 19 ret float %conv 20} 21 22; Test i64->f64. 23define double @f2(i64 %i) #0 { 24; CHECK-LABEL: f2: 25; CHECK: cdgbr 26; CHECK: adbr 27; CHECK: br %r14 28 %conv = call double @llvm.experimental.constrained.uitofp.f64.i64(i64 %i, 29 metadata !"round.dynamic", 30 metadata !"fpexcept.strict") #0 31 ret double %conv 32} 33 34; Test i64->f128. 35define void @f3(i64 %i, ptr %dst) #0 { 36; CHECK-LABEL: f3: 37; CHECK: cxgbr 38; CHECK: axbr 39; CHECK: br %r14 40 %conv = call fp128 @llvm.experimental.constrained.uitofp.f128.i64(i64 %i, 41 metadata !"round.dynamic", 42 metadata !"fpexcept.strict") #0 43 store fp128 %conv, ptr %dst 44 ret void 45} 46 47attributes #0 = { strictfp } 48