• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=ptx32 | FileCheck %s
2
3define ptx_device i32 @test_selp_i32(i1 %x, i32 %y, i32 %z) {
4; CHECK: selp.u32 %ret{{[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
9define ptx_device i64 @test_selp_i64(i1 %x, i64 %y, i64 %z) {
10; CHECK: selp.u64 %ret{{[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
15define ptx_device float @test_selp_f32(i1 %x, float %y, float %z) {
16; CHECK: selp.f32 %ret{{[0-9]+}}, %f{{[0-9]+}}, %f{{[0-9]+}}, %p{{[0-9]+}};
17	%a = select i1 %x, float %y, float %z
18	ret float %a
19}
20
21define ptx_device double @test_selp_f64(i1 %x, double %y, double %z) {
22; CHECK: selp.f64 %ret{{[0-9]+}}, %fd{{[0-9]+}}, %fd{{[0-9]+}}, %p{{[0-9]+}};
23	%a = select i1 %x, double %y, double %z
24	ret double %a
25}
26