| ; Test conversions of unsigned i32s to floating-point values (z10 only). |
| ; RUN: llc < %s -mtriple=s390x-linux-gnu -mcpu=z10 | FileCheck %s |
| ; Check i32->f32. There is no native instruction, so we must promote |
| define float @f1(i32 %i) { |
| ; CHECK: llgfr [[REGISTER:%r[0-5]]], %r2 |
| ; CHECK: cegbr %f0, [[REGISTER]] |
| %conv = uitofp i32 %i to float |
| define double @f2(i32 %i) { |
| ; CHECK: llgfr [[REGISTER:%r[0-5]]], %r2 |
| ; CHECK: cdgbr %f0, [[REGISTER]] |
| %conv = uitofp i32 %i to double |
| define void @f3(i32 %i, ptr %dst) { |
| ; CHECK: llgfr [[REGISTER:%r[0-5]]], %r2 |
| ; CHECK: cxgbr %f0, [[REGISTER]] |
| %conv = uitofp i32 %i to fp128 |
| store fp128 %conv, ptr %dst |