brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · 0ae5a86 Raw
27 lines · plain
1; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1010 < %s | FileCheck -check-prefixes=GCN %s2; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1010 < %s | FileCheck -check-prefixes=GCN %s3; RUN: llc -global-isel=0 -mtriple=amdgcn -mcpu=gfx1100 < %s | FileCheck -check-prefixes=GCN %s4; RUN: llc -global-isel=1 -mtriple=amdgcn -mcpu=gfx1100 < %s | FileCheck -check-prefixes=GCN %s5 6; GCN-LABEL: {{^}}ds_ordered_add:7; GCN-DAG: v_{{(dual_)?}}mov_b32{{(_e32)?}} v[[INCR:[0-9]+]], 318; GCN-DAG: s_mov_b32 m0,9; GCN: ds_ordered_count v{{[0-9]+}}, v[[INCR]] offset:772 gds10define amdgpu_kernel void @ds_ordered_add(ptr addrspace(2) inreg %gds, ptr addrspace(1) %out) {11  %val = call i32@llvm.amdgcn.ds.ordered.add(ptr addrspace(2) %gds, i32 31, i32 0, i32 0, i1 false, i32 16777217, i1 true, i1 true)12  store i32 %val, ptr addrspace(1) %out13  ret void14}15 16; GCN-LABEL: {{^}}ds_ordered_add_4dw:17; GCN-DAG: v_{{(dual_)?}}mov_b32{{(_e32)?}} v[[INCR:[0-9]+]], 3118; GCN-DAG: s_mov_b32 m0,19; GCN: ds_ordered_count v{{[0-9]+}}, v[[INCR]] offset:49924 gds20define amdgpu_kernel void @ds_ordered_add_4dw(ptr addrspace(2) inreg %gds, ptr addrspace(1) %out) {21  %val = call i32@llvm.amdgcn.ds.ordered.add(ptr addrspace(2) %gds, i32 31, i32 0, i32 0, i1 false, i32 67108865, i1 true, i1 true)22  store i32 %val, ptr addrspace(1) %out23  ret void24}25 26declare i32 @llvm.amdgcn.ds.ordered.add(ptr addrspace(2) nocapture, i32, i32, i32, i1, i32, i1, i1)27