• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=GCN %s
2; RUN: llc -march=amdgcn -mcpu=tonga -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=GCN %s
3
4
5; GCN-LABEL: {{^}}set_inactive:
6; GCN: s_not_b64 exec, exec
7; GCN: v_mov_b32_e32 {{v[0-9]+}}, 42
8; GCN: s_not_b64 exec, exec
9define amdgpu_kernel void @set_inactive(i32 addrspace(1)* %out, i32 %in) {
10  %tmp = call i32 @llvm.amdgcn.set.inactive.i32(i32 %in, i32 42) #0
11  store i32 %tmp, i32 addrspace(1)* %out
12  ret void
13}
14
15; GCN-LABEL: {{^}}set_inactive_64:
16; GCN: s_not_b64 exec, exec
17; GCN: v_mov_b32_e32 {{v[0-9]+}}, 0
18; GCN: v_mov_b32_e32 {{v[0-9]+}}, 0
19; GCN: s_not_b64 exec, exec
20define amdgpu_kernel void @set_inactive_64(i64 addrspace(1)* %out, i64 %in) {
21  %tmp = call i64 @llvm.amdgcn.set.inactive.i64(i64 %in, i64 0) #0
22  store i64 %tmp, i64 addrspace(1)* %out
23  ret void
24}
25
26declare i32 @llvm.amdgcn.set.inactive.i32(i32, i32) #0
27declare i64 @llvm.amdgcn.set.inactive.i64(i64, i64) #0
28
29attributes #0 = { convergent readnone }
30