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
3 ; RUN: llc -march=amdgcn -mcpu=gfx1100 -verify-machineinstrs < %s | FileCheck -check-prefixes=GCN,WAVE32 %s
6 ; GCN-LABEL: {{^}}sub_var_var_i1:
9 define amdgpu_kernel void @sub_var_var_i1(ptr addrspace(1) %out, ptr addrspace(1) %in0, ptr addrspace(1) %in1) {
10 %a = load volatile i1, ptr addrspace(1) %in0
11 %b = load volatile i1, ptr addrspace(1) %in1
13 store i1 %sub, ptr addrspace(1) %out
17 ; GCN-LABEL: {{^}}sub_var_imm_i1:
20 define amdgpu_kernel void @sub_var_imm_i1(ptr addrspace(1) %out, ptr addrspace(1) %in) {
21 %a = load volatile i1, ptr addrspace(1) %in
23 store i1 %sub, ptr addrspace(1) %out
27 ; GCN-LABEL: {{^}}sub_i1_cf:
31 define amdgpu_kernel void @sub_i1_cf(ptr addrspace(1) %out, ptr addrspace(1) %a, ptr addrspace(1) %b) {
33 %tid = call i32 @llvm.amdgcn.workitem.id.x()
34 %d_cmp = icmp ult i32 %tid, 16
35 br i1 %d_cmp, label %if, label %else
38 %0 = load volatile i1, ptr addrspace(1) %a
42 %1 = load volatile i1, ptr addrspace(1) %b
46 %2 = phi i1 [%0, %if], [%1, %else]
48 store i1 %3, ptr addrspace(1) %out
52 declare i32 @llvm.amdgcn.workitem.id.x()