1 ; Test conversions of unsigned integers to floating-point values
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z196 | FileCheck %s
7 define float @f1(i32 %i) {
9 ; CHECK: celfbr %f0, 0, %r2, 0
11 %conv = uitofp i32 %i to float
16 define double @f2(i32 %i) {
18 ; CHECK: cdlfbr %f0, 0, %r2, 0
20 %conv = uitofp i32 %i to double
25 define void @f3(i32 %i, ptr %dst) {
27 ; CHECK: cxlfbr %f0, 0, %r2, 0
28 ; CHECK-DAG: std %f0, 0(%r3)
29 ; CHECK-DAG: std %f2, 8(%r3)
31 %conv = uitofp i32 %i to fp128
32 store fp128 %conv, ptr %dst
37 define float @f4(i64 %i) {
39 ; CHECK: celgbr %f0, 0, %r2, 0
41 %conv = uitofp i64 %i to float
46 define double @f5(i64 %i) {
48 ; CHECK: cdlgbr %f0, 0, %r2, 0
50 %conv = uitofp i64 %i to double
55 define void @f6(i64 %i, ptr %dst) {
57 ; CHECK: cxlgbr %f0, 0, %r2, 0
58 ; CHECK-DAG: std %f0, 0(%r3)
59 ; CHECK-DAG: std %f2, 8(%r3)
61 %conv = uitofp i64 %i to fp128
62 store fp128 %conv, ptr %dst