1 ; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s
2 ; RUN: %if ptxas %{ llc < %s -march=nvptx64 -mcpu=sm_20 | %ptxas-verify %}
5 ; CHECK: setp.eq.b16 %[[P:p[0-9]+]], %{{.*}}, 1;
6 ; CHECK: selp.u32 %[[R:r[0-9]+]], 1, 0, %[[P]];
7 ; CHECK: cvt.rn.f32.u32 %f{{.*}}, %[[R]]
8 define float @foo(i1 %a) {
9 %ret = uitofp i1 %a to float
14 ; CHECK: setp.eq.b16 %[[P:p[0-9]+]], %{{.*}}, 1;
15 ; CHECK: selp.s32 %[[R:r[0-9]+]], -1, 0, %[[P]];
16 ; CHECK: cvt.rn.f32.s32 %f{{.*}}, %[[R]]
17 define float @foo2(i1 %a) {
18 %ret = sitofp i1 %a to float
23 ; CHECK: setp.eq.b16 %[[P:p[0-9]+]], %{{.*}}, 1;
24 ; CHECK: selp.u32 %[[R:r[0-9]+]], 1, 0, %[[P]];
25 ; CHECK: cvt.rn.f64.u32 %fd{{.*}}, %[[R]]
26 define double @foo3(i1 %a) {
27 %ret = uitofp i1 %a to double
32 ; CHECK: setp.eq.b16 %[[P:p[0-9]+]], %{{.*}}, 1;
33 ; CHECK: selp.s32 %[[R:r[0-9]+]], -1, 0, %[[P]];
34 ; CHECK: cvt.rn.f64.s32 %fd{{.*}}, %[[R]]
35 define double @foo4(i1 %a) {
36 %ret = sitofp i1 %a to double
41 ; CHECK: setp.eq.b16 %[[P:p[0-9]+]], %{{.*}}, 1;
42 ; CHECK: selp.u32 %[[R:r[0-9]+]], 1, 0, %[[P]];
43 ; CHECK: cvt.rn.f16.u32 %{{.*}}, %[[R]]
44 define half @foo5(i1 %a) {
45 %ret = uitofp i1 %a to half
50 ; CHECK: setp.eq.b16 %[[P:p[0-9]+]], %{{.*}}, 1;
51 ; CHECK: selp.s32 %[[R:r[0-9]+]], -1, 0, %[[P]];
52 ; CHECK: cvt.rn.f16.s32 %{{.*}}, %[[R]]
53 define half @foo6(i1 %a) {
54 %ret = sitofp i1 %a to half