blob: deeffbf30c0ed2a86f28c3882f94800887558662 [file] [log] [blame]
Ulrich Weigand9e3577f2013-05-06 16:17:29 +00001; Test conversions of signed i32s to floating-point values.
2;
3; RUN: llc < %s -mtriple=s390x-linux-gnu | FileCheck %s
4
5; Check i32->f32.
6define float @f1(i32 %i) {
Stephen Lind24ab202013-07-14 06:24:09 +00007; CHECK-LABEL: f1:
Ulrich Weigand9e3577f2013-05-06 16:17:29 +00008; CHECK: cefbr %f0, %r2
9; CHECK: br %r14
10 %conv = sitofp i32 %i to float
11 ret float %conv
12}
13
14; Check i32->f64.
15define double @f2(i32 %i) {
Stephen Lind24ab202013-07-14 06:24:09 +000016; CHECK-LABEL: f2:
Ulrich Weigand9e3577f2013-05-06 16:17:29 +000017; CHECK: cdfbr %f0, %r2
18; CHECK: br %r14
19 %conv = sitofp i32 %i to double
20 ret double %conv
21}
22
23; Check i32->f128.
24define void @f3(i32 %i, fp128 *%dst) {
Stephen Lind24ab202013-07-14 06:24:09 +000025; CHECK-LABEL: f3:
Ulrich Weigand9e3577f2013-05-06 16:17:29 +000026; CHECK: cxfbr %f0, %r2
27; CHECK: std %f0, 0(%r3)
28; CHECK: std %f2, 8(%r3)
29; CHECK: br %r14
30 %conv = sitofp i32 %i to fp128
31 store fp128 %conv, fp128 *%dst
32 ret void
33}