xref: /llvm-project/llvm/test/CodeGen/AMDGPU/store-vector-ptrs.ll (revision 9e9907f1cfa424366fba58d9520f9305b537cec9)
1; RUN: llc -mtriple=amdgcn -mcpu=tahiti -verify-machineinstrs< %s
2; RUN: llc -mtriple=amdgcn -mcpu=tonga -verify-machineinstrs< %s
3
4; This tests for a bug that caused a crash in
5; AMDGPUDAGToDAGISel::SelectMUBUFScratch() which is used for selecting
6; scratch loads and stores.
7; CHECK-LABEL: {{^}}store_vector_ptrs:
8define amdgpu_kernel void @store_vector_ptrs(ptr addrspace(5) %out, <4 x ptr addrspace(5)> %array) nounwind {
9  %p = getelementptr [1024 x i32], <4 x ptr addrspace(5)> %array, <4 x i16> zeroinitializer, <4 x i16> <i16 16, i16 16, i16 16, i16 16>
10  store <4 x ptr addrspace(5)> %p, ptr addrspace(5) %out
11  ret void
12}
13