1 ; RUN: llc -march=amdgcn -mcpu=gfx600 -verify-machineinstrs < %s | FileCheck --check-prefix=GCN --check-prefix=GFX600 %s
2 ; RUN: llc -march=amdgcn -mcpu=gfx700 -verify-machineinstrs < %s | FileCheck --check-prefix=GCN --check-prefix=GFX700 %s
3 ; RUN: llc -march=amdgcn -mcpu=gfx801 -verify-machineinstrs < %s | FileCheck --check-prefix=GCN --check-prefix=GFX801 %s
4 ; RUN: llc -march=amdgcn -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck --check-prefix=GCN --check-prefix=GFX900 %s
6 ; GCN-LABEL: {{^}}scalar_andn2_i32_one_use
8 define amdgpu_kernel void @scalar_andn2_i32_one_use(
9 i32 addrspace(1)* %r0, i32 %a, i32 %b) {
12 %r0.val = and i32 %a, %nb
13 store i32 %r0.val, i32 addrspace(1)* %r0
17 ; GCN-LABEL: {{^}}scalar_andn2_i64_one_use
19 define amdgpu_kernel void @scalar_andn2_i64_one_use(
20 i64 addrspace(1)* %r0, i64 %a, i64 %b) {
23 %r0.val = and i64 %a, %nb
24 store i64 %r0.val, i64 addrspace(1)* %r0
28 ; GCN-LABEL: {{^}}scalar_orn2_i32_one_use
30 define amdgpu_kernel void @scalar_orn2_i32_one_use(
31 i32 addrspace(1)* %r0, i32 %a, i32 %b) {
34 %r0.val = or i32 %a, %nb
35 store i32 %r0.val, i32 addrspace(1)* %r0
39 ; GCN-LABEL: {{^}}scalar_orn2_i64_one_use
41 define amdgpu_kernel void @scalar_orn2_i64_one_use(
42 i64 addrspace(1)* %r0, i64 %a, i64 %b) {
45 %r0.val = or i64 %a, %nb
46 store i64 %r0.val, i64 addrspace(1)* %r0
50 ; GCN-LABEL: {{^}}vector_andn2_i32_s_v_one_use
53 define amdgpu_kernel void @vector_andn2_i32_s_v_one_use(
54 i32 addrspace(1)* %r0, i32 %s) {
56 %v = call i32 @llvm.amdgcn.workitem.id.x() #1
58 %r0.val = and i32 %s, %not
59 store i32 %r0.val, i32 addrspace(1)* %r0
63 ; GCN-LABEL: {{^}}vector_andn2_i32_v_s_one_use
66 define amdgpu_kernel void @vector_andn2_i32_v_s_one_use(
67 i32 addrspace(1)* %r0, i32 %s) {
69 %v = call i32 @llvm.amdgcn.workitem.id.x() #1
71 %r0.val = and i32 %v, %not
72 store i32 %r0.val, i32 addrspace(1)* %r0
76 ; GCN-LABEL: {{^}}vector_orn2_i32_s_v_one_use
79 define amdgpu_kernel void @vector_orn2_i32_s_v_one_use(
80 i32 addrspace(1)* %r0, i32 %s) {
82 %v = call i32 @llvm.amdgcn.workitem.id.x() #1
84 %r0.val = or i32 %s, %not
85 store i32 %r0.val, i32 addrspace(1)* %r0
89 ; GCN-LABEL: {{^}}vector_orn2_i32_v_s_one_use
92 define amdgpu_kernel void @vector_orn2_i32_v_s_one_use(
93 i32 addrspace(1)* %r0, i32 %s) {
95 %v = call i32 @llvm.amdgcn.workitem.id.x() #1
97 %r0.val = or i32 %v, %not
98 store i32 %r0.val, i32 addrspace(1)* %r0
102 ; Function Attrs: nounwind readnone
103 declare i32 @llvm.amdgcn.workitem.id.x() #0