1 ; RUN: llc < %s -march=nvptx64 | FileCheck %s 2 declare i32 @get_register() 3 4 define i1 @test1() { 5 entry: 6 %call = call i32 @llvm.nvvm.read.ptx.sreg.tid.x(), !range !0 7 %cmp = icmp eq i32 %call, 1 8 ret i1 %cmp 9 } 10 11 ; CHECK-LABEL: test1( 12 ; CHECK: setp.eq.s32 %p1, %r1, 1; 13 ; CHECK: selp.u32 %[[R:.+]], 1, 0, %p1; 14 ; CHECK: st.param.b32 [func_retval0+0], %[[R]]; 15 16 declare i32 @llvm.nvvm.read.ptx.sreg.tid.x() 17 18 !0 = !{ i32 0, i32 3 } 19