We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7f5bd91 commit 5ab861fCopy full SHA for 5ab861f
llvm/test/CodeGen/AMDGPU/and.ll
@@ -176,13 +176,11 @@ define amdgpu_kernel void @s_and_i64(ptr addrspace(1) %out, i64 %a, i64 %b) {
176
177
; FUNC-LABEL: {{^}}s_and_i1:
178
; SI: s_load_dword [[LOAD:s[0-9]+]]
179
-; SI: s_bitcmp1_b32 [[LOAD]], 0
180
-; SI: s_cselect_b64 [[SEL1:s\[[0-9]+:[0-9]+\]]], -1, 0
181
-; SI: s_bitcmp1_b32 [[LOAD]], 8
182
-; SI: s_cselect_b64 [[SEL2:s\[[0-9]+:[0-9]+\]]], -1, 0
183
-; SI: s_and_b64 [[SEL1]], [[SEL1]], [[SEL2]]
184
-; SI: v_cndmask_b32_e64 [[V:v[0-9]+]], 0, 1, [[SEL1]]
185
-; SI: buffer_store_byte [[V]]
+; SI: s_lshr_b32 [[B_SHIFT:s[0-9]+]], [[LOAD]], 8
+; SI: s_and_b32 [[AND:s[0-9]+]], [[LOAD]], [[B_SHIFT]]
+; SI: s_and_b32 [[AND_TRUNC:s[0-9]+]], [[AND]], 1{{$}}
+; SI: v_mov_b32_e32 [[V_AND_TRUNC:v[0-9]+]], [[AND_TRUNC]]
+; SI: buffer_store_byte [[V_AND_TRUNC]]
186
define amdgpu_kernel void @s_and_i1(ptr addrspace(1) %out, i1 %a, i1 %b) {
187
%and = and i1 %a, %b
188
store i1 %and, ptr addrspace(1) %out
0 commit comments