diff options
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/no-shrink-extloads.ll')
-rw-r--r-- | llvm/test/CodeGen/AMDGPU/no-shrink-extloads.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/no-shrink-extloads.ll b/llvm/test/CodeGen/AMDGPU/no-shrink-extloads.ll index e4328ecbaca..f81911aafe2 100644 --- a/llvm/test/CodeGen/AMDGPU/no-shrink-extloads.ll +++ b/llvm/test/CodeGen/AMDGPU/no-shrink-extloads.ll @@ -189,3 +189,15 @@ define void @truncate_buffer_load_i64_to_i8(i8 addrspace(1)* %out, i64 addrspace store i8 %trunc, i8 addrspace(1)* %gep.out ret void } + +; FUNC-LABEL: {{^}}smrd_mask_i32_to_i16 +; SI: s_load_dword [[LOAD:s[0-9]+]], s[{{[0-9]+}}:{{[0-9]+}}], 0x0 +; SI: s_waitcnt lgkmcnt(0) +; SI: s_and_b32 s{{[0-9]+}}, [[LOAD]], 0xffff +define void @smrd_mask_i32_to_i16(i32 addrspace(1)* %out, i32 addrspace(2)* %in) { +entry: + %val = load i32, i32 addrspace(2)* %in + %mask = and i32 %val, 65535 + store i32 %mask, i32 addrspace(1)* %out + ret void +} |