1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5
2 ; RUN: llc -mtriple=amdgcn -mcpu=tahiti -mattr=-flat-for-global -verify-machineinstrs < %s | FileCheck -check-prefix=SI %s
4 define amdgpu_kernel void @s_or_to_orn2(ptr addrspace(1) %out, i32 %in) {
5 ; SI-LABEL: s_or_to_orn2:
7 ; SI-NEXT: s_load_dword s6, s[4:5], 0xb
8 ; SI-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x9
9 ; SI-NEXT: s_mov_b32 s3, 0xf000
10 ; SI-NEXT: s_mov_b32 s2, -1
11 ; SI-NEXT: s_waitcnt lgkmcnt(0)
12 ; SI-NEXT: s_or_b32 s4, s6, 0xffffffcd
13 ; SI-NEXT: v_mov_b32_e32 v0, s4
14 ; SI-NEXT: buffer_store_dword v0, off, s[0:3], 0
17 store i32 %x, ptr addrspace(1) %out
21 define amdgpu_kernel void @s_or_to_orn2_imm0(ptr addrspace(1) %out, i32 %in) {
22 ; SI-LABEL: s_or_to_orn2_imm0:
24 ; SI-NEXT: s_load_dword s6, s[4:5], 0xb
25 ; SI-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x9
26 ; SI-NEXT: s_mov_b32 s3, 0xf000
27 ; SI-NEXT: s_mov_b32 s2, -1
28 ; SI-NEXT: s_waitcnt lgkmcnt(0)
29 ; SI-NEXT: s_or_b32 s4, s6, 0xffffffcd
30 ; SI-NEXT: v_mov_b32_e32 v0, s4
31 ; SI-NEXT: buffer_store_dword v0, off, s[0:3], 0
34 store i32 %x, ptr addrspace(1) %out
38 define amdgpu_kernel void @s_and_to_andn2(ptr addrspace(1) %out, i32 %in) {
39 ; SI-LABEL: s_and_to_andn2:
41 ; SI-NEXT: s_load_dword s6, s[4:5], 0xb
42 ; SI-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x9
43 ; SI-NEXT: s_mov_b32 s3, 0xf000
44 ; SI-NEXT: s_mov_b32 s2, -1
45 ; SI-NEXT: s_waitcnt lgkmcnt(0)
46 ; SI-NEXT: s_and_b32 s4, s6, 0xffffffcd
47 ; SI-NEXT: v_mov_b32_e32 v0, s4
48 ; SI-NEXT: buffer_store_dword v0, off, s[0:3], 0
51 store i32 %x, ptr addrspace(1) %out
55 define amdgpu_kernel void @s_and_to_andn2_imm0(ptr addrspace(1) %out, i32 %in) {
56 ; SI-LABEL: s_and_to_andn2_imm0:
58 ; SI-NEXT: s_load_dword s6, s[4:5], 0xb
59 ; SI-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x9
60 ; SI-NEXT: s_mov_b32 s3, 0xf000
61 ; SI-NEXT: s_mov_b32 s2, -1
62 ; SI-NEXT: s_waitcnt lgkmcnt(0)
63 ; SI-NEXT: s_and_b32 s4, s6, 0xffffffcd
64 ; SI-NEXT: v_mov_b32_e32 v0, s4
65 ; SI-NEXT: buffer_store_dword v0, off, s[0:3], 0
68 store i32 %x, ptr addrspace(1) %out
72 define amdgpu_kernel void @s_xor_to_xnor(ptr addrspace(1) %out, i32 %in) {
73 ; SI-LABEL: s_xor_to_xnor:
75 ; SI-NEXT: s_load_dword s6, s[4:5], 0xb
76 ; SI-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x9
77 ; SI-NEXT: s_mov_b32 s3, 0xf000
78 ; SI-NEXT: s_mov_b32 s2, -1
79 ; SI-NEXT: s_waitcnt lgkmcnt(0)
80 ; SI-NEXT: s_xor_b32 s4, s6, 0xffffffcd
81 ; SI-NEXT: v_mov_b32_e32 v0, s4
82 ; SI-NEXT: buffer_store_dword v0, off, s[0:3], 0
85 store i32 %x, ptr addrspace(1) %out
89 define amdgpu_kernel void @s_xor_to_xnor_imm0(ptr addrspace(1) %out, i32 %in) {
90 ; SI-LABEL: s_xor_to_xnor_imm0:
92 ; SI-NEXT: s_load_dword s6, s[4:5], 0xb
93 ; SI-NEXT: s_load_dwordx2 s[0:1], s[4:5], 0x9
94 ; SI-NEXT: s_mov_b32 s3, 0xf000
95 ; SI-NEXT: s_mov_b32 s2, -1
96 ; SI-NEXT: s_waitcnt lgkmcnt(0)
97 ; SI-NEXT: s_xor_b32 s4, s6, 0xffffffcd
98 ; SI-NEXT: v_mov_b32_e32 v0, s4
99 ; SI-NEXT: buffer_store_dword v0, off, s[0:3], 0
101 %x = xor i32 -51, %in
102 store i32 %x, ptr addrspace(1) %out