e705fbea27cd5c6e994e7308f1ec222825a369bf
[oota-llvm.git] / test / CodeGen / PTX / selp.ll
1 ; RUN: llc < %s -march=ptx32 | FileCheck %s
2
3 define ptx_device i32 @test_selp_i32(i1 %x, i32 %y, i32 %z) {
4 ; CHECK: selp.u32 r{{[0-9]+}}, r{{[0-9]+}}, r{{[0-9]+}}, p{{[0-9]+}};
5         %a = select i1 %x, i32 %y, i32 %z
6         ret i32 %a
7 }
8
9 define ptx_device i64 @test_selp_i64(i1 %x, i64 %y, i64 %z) {
10 ; CHECK: selp.u64 rd{{[0-9]+}}, rd{{[0-9]+}}, rd{{[0-9]+}}, p{{[0-9]+}};
11         %a = select i1 %x, i64 %y, i64 %z
12         ret i64 %a
13 }
14
15 define ptx_device float @test_selp_f32(i1 %x, float %y, float %z) {
16 ; CHECK: selp.f32 r{{[0-9]+}}, r{{[0-9]+}}, r{{[0-9]+}}, p{{[0-9]+}};
17         %a = select i1 %x, float %y, float %z
18         ret float %a
19 }
20
21 define ptx_device double @test_selp_f64(i1 %x, double %y, double %z) {
22 ; CHECK: selp.f64 rd{{[0-9]+}}, rd{{[0-9]+}}, rd{{[0-9]+}}, p{{[0-9]+}};
23         %a = select i1 %x, double %y, double %z
24         ret double %a
25 }