; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --function foo --extra_scrub --default-march nvptx64 --filter-out ".*//.*" --filter-out "[\(\)\{\}]" --version 5
; RUN: llc < %s -march=nvptx64 -mcpu=sm_20 | FileCheck %s
; RUN: %if ptxas %{ llc < %s -march=nvptx64 -mcpu=sm_20 | %ptxas-verify %}
target triple = "nvptx-nvidia-cuda"
@i1g = addrspace(1) global i1 false, align 2
define void @foo() {
; CHECK-LABEL: foo(
; CHECK: .reg .pred %p<2>;
; CHECK: .reg .b16 %rs<4>;
; CHECK-EMPTY:
; CHECK: ld.global.u8 %rs1, [i1g];
; CHECK: and.b16 %rs2, %rs1, 1;
; CHECK: setp.eq.b16 %p1, %rs2, 1;
; CHECK: @%p1 bra $L__BB0_2;
; CHECK: mov.u16 %rs3, 1;
; CHECK: st.global.u8 [i1g], %rs3;
; CHECK: ret;
%tmp = load i1, ptr addrspace(1) @i1g, align 2
br i1 %tmp, label %if.end, label %if.then
if.then:
store i1 true, ptr addrspace(1) @i1g, align 2
br label %if.end
if.end:
ret void
}