1 ; Test floating-point conversion to/from 128-bit integers.
3 ; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
4 ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z13 | FileCheck %s
6 ; Test signed i128->f128.
7 define fp128 @f1(i128 %i) {
9 ; CHECK: brasl %r14, __floattitf@PLT
11 %conv = sitofp i128 %i to fp128
15 ; Test signed i128->f64.
16 define double @f2(i128 %i) {
18 ; CHECK: brasl %r14, __floattidf@PLT
20 %conv = sitofp i128 %i to double
24 ; Test signed i128->f32.
25 define float @f3(i128 %i) {
27 ; CHECK: brasl %r14, __floattisf@PLT
29 %conv = sitofp i128 %i to float
33 ; Test unsigned i128->f128.
34 define fp128 @f4(i128 %i) {
36 ; CHECK: brasl %r14, __floatuntitf@PLT
38 %conv = uitofp i128 %i to fp128
42 ; Test unsigned i128->f64.
43 define double @f5(i128 %i) {
45 ; CHECK: brasl %r14, __floatuntidf@PLT
47 %conv = uitofp i128 %i to double
51 ; Test unsigned i128->f32.
52 define float @f6(i128 %i) {
54 ; CHECK: brasl %r14, __floatuntisf@PLT
56 %conv = uitofp i128 %i to float
60 ; Test signed f128->i128.
61 define i128 @f7(fp128 %f) {
63 ; CHECK: brasl %r14, __fixtfti@PLT
65 %conv = fptosi fp128 %f to i128
69 ; Test signed f64->i128.
70 define i128 @f8(double %f) {
72 ; CHECK: brasl %r14, __fixdfti@PLT
74 %conv = fptosi double %f to i128
78 ; Test signed f9->i128.
79 define i128 @f9(float %f) {
81 ; CHECK: brasl %r14, __fixsfti@PLT
83 %conv = fptosi float %f to i128
87 ; Test unsigned f128->i128.
88 define i128 @f10(fp128 %f) {
90 ; CHECK: brasl %r14, __fixunstfti@PLT
92 %conv = fptoui fp128 %f to i128
96 ; Test unsigned f64->i128.
97 define i128 @f11(double %f) {
99 ; CHECK: brasl %r14, __fixunsdfti@PLT
101 %conv = fptoui double %f to i128
105 ; Test unsigned f32->i128.
106 define i128 @f12(float %f) {
108 ; CHECK: brasl %r14, __fixunssfti@PLT
110 %conv = fptoui float %f to i128