diff options
| author | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2018-11-13 21:18:21 +0000 |
|---|---|---|
| committer | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2018-11-13 21:18:21 +0000 |
| commit | bcb34ac2ea6c7232a86f6da569afe3d6dbccd7c4 (patch) | |
| tree | d2011b76c57899a48bfb716d6097dcc660c478aa /llvm/test/CodeGen/AMDGPU/vector-extract-insert.ll | |
| parent | c2078fb1c8b63557d3b78af4b8897c617b1804df (diff) | |
| download | bcm5719-llvm-bcb34ac2ea6c7232a86f6da569afe3d6dbccd7c4.tar.gz bcm5719-llvm-bcb34ac2ea6c7232a86f6da569afe3d6dbccd7c4.zip | |
[AMDGPU] combine extractelement into several selects
An extractelement with non-constant index will be lowered either to
scratch or movrel loop in most cases. This patch converts such
instruction into a set of selects if vector size is not too big.
Differential Revision: https://reviews.llvm.org/D54351
llvm-svn: 346800
Diffstat (limited to 'llvm/test/CodeGen/AMDGPU/vector-extract-insert.ll')
| -rw-r--r-- | llvm/test/CodeGen/AMDGPU/vector-extract-insert.ll | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/AMDGPU/vector-extract-insert.ll b/llvm/test/CodeGen/AMDGPU/vector-extract-insert.ll index e3027d09309..4475ebfe6fe 100644 --- a/llvm/test/CodeGen/AMDGPU/vector-extract-insert.ll +++ b/llvm/test/CodeGen/AMDGPU/vector-extract-insert.ll @@ -28,7 +28,9 @@ define amdgpu_kernel void @extract_insert_same_dynelt_v4i32(i32 addrspace(1)* %o ; GCN-LABEL: {{^}}extract_insert_different_dynelt_v4i32: ; GCN: buffer_load_dwordx4 ; GCN: v_movreld_b32 -; GCN: v_movrels_b32 +; GCN: v_cndmask_b32 +; GCN: v_cndmask_b32 +; GCN: v_cndmask_b32 ; GCN: buffer_store_dword v define amdgpu_kernel void @extract_insert_different_dynelt_v4i32(i32 addrspace(1)* %out, <4 x i32> addrspace(1)* %in, i32 %val, i32 %idx0, i32 %idx1) #1 { %id = call i32 @llvm.amdgcn.workitem.id.x() |

