1 ; RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,WAVE64 %s
2 ; RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,WAVE32 %s
5 ; GCN-LABEL: {{^}}sub_var_var_i1:
8 define amdgpu_kernel void @sub_var_var_i1(i1 addrspace(1)* %out, i1 addrspace(1)* %in0, i1 addrspace(1)* %in1) {
9 %a = load volatile i1, i1 addrspace(1)* %in0
10 %b = load volatile i1, i1 addrspace(1)* %in1
12 store i1 %sub, i1 addrspace(1)* %out
16 ; GCN-LABEL: {{^}}sub_var_imm_i1:
19 define amdgpu_kernel void @sub_var_imm_i1(i1 addrspace(1)* %out, i1 addrspace(1)* %in) {
20 %a = load volatile i1, i1 addrspace(1)* %in
22 store i1 %sub, i1 addrspace(1)* %out
26 ; GCN-LABEL: {{^}}sub_i1_cf:
30 define amdgpu_kernel void @sub_i1_cf(i1 addrspace(1)* %out, i1 addrspace(1)* %a, i1 addrspace(1)* %b) {
32 %tid = call i32 @llvm.amdgcn.workitem.id.x()
33 %d_cmp = icmp ult i32 %tid, 16
34 br i1 %d_cmp, label %if, label %else
37 %0 = load volatile i1, i1 addrspace(1)* %a
41 %1 = load volatile i1, i1 addrspace(1)* %b
45 %2 = phi i1 [%0, %if], [%1, %else]
47 store i1 %3, i1 addrspace(1)* %out
51 declare i32 @llvm.amdgcn.workitem.id.x()