source: icGREP/icgrep-devel/llvm-3.8.0.src/test/CodeGen/AMDGPU/extract-vector-elt-i64.ll @ 5027

Last change on this file since 5027 was 5027, checked in by cameron, 3 years ago

Upgrade to llvm 3.8

File size: 1.6 KB
Line 
1; RUN: llc -march=amdgcn -verify-machineinstrs < %s | FileCheck -check-prefix=GCN %s
2
3; How the replacement of i64 stores with v2i32 stores resulted in
4; breaking other users of the bitcast if they already existed
5
6; GCN-LABEL: {{^}}extract_vector_elt_select_error:
7; GCN: buffer_store_dword
8; GCN: buffer_store_dword
9; GCN: buffer_store_dwordx2
10define void @extract_vector_elt_select_error(i32 addrspace(1)* %out, i64 addrspace(1)* %in, i64 %val) nounwind {
11  %vec = bitcast i64 %val to <2 x i32>
12  %elt0 = extractelement <2 x i32> %vec, i32 0
13  %elt1 = extractelement <2 x i32> %vec, i32 1
14
15  store volatile i32 %elt0, i32 addrspace(1)* %out
16  store volatile i32 %elt1, i32 addrspace(1)* %out
17  store volatile i64 %val, i64 addrspace(1)* %in
18  ret void
19}
20
21
22define void @extract_vector_elt_v2i64(i64 addrspace(1)* %out, <2 x i64> %foo) nounwind {
23  %p0 = extractelement <2 x i64> %foo, i32 0
24  %p1 = extractelement <2 x i64> %foo, i32 1
25  %out1 = getelementptr i64, i64 addrspace(1)* %out, i32 1
26  store volatile i64 %p1, i64 addrspace(1)* %out
27  store volatile i64 %p0, i64 addrspace(1)* %out1
28  ret void
29}
30
31define void @dyn_extract_vector_elt_v2i64(i64 addrspace(1)* %out, <2 x i64> %foo, i32 %elt) nounwind {
32  %dynelt = extractelement <2 x i64> %foo, i32 %elt
33  store volatile i64 %dynelt, i64 addrspace(1)* %out
34  ret void
35}
36
37define void @dyn_extract_vector_elt_v2i64_2(i64 addrspace(1)* %out, <2 x i64> addrspace(1)* %foo, i32 %elt, <2 x i64> %arst) nounwind {
38  %load = load volatile <2 x i64>, <2 x i64> addrspace(1)* %foo
39  %or = or <2 x i64> %load, %arst
40  %dynelt = extractelement <2 x i64> %or, i32 %elt
41  store volatile i64 %dynelt, i64 addrspace(1)* %out
42  ret void
43}
Note: See TracBrowser for help on using the repository browser.