comparison test/CodeGen/AMDGPU/extract_vector_elt_i16.ll @ 95:afa8332a0e37 LLVM3.8

LLVM 3.8
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Tue, 13 Oct 2015 17:48:58 +0900
parents
children
comparison
equal deleted inserted replaced
84:f3e34b893a5f 95:afa8332a0e37
1 ; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs< %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
2 ; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs< %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
3
4 ; FUNC-LABEL: {{^}}extract_vector_elt_v2i16:
5 ; SI: buffer_load_ushort
6 ; SI: buffer_load_ushort
7 ; SI: buffer_store_short
8 ; SI: buffer_store_short
9 define void @extract_vector_elt_v2i16(i16 addrspace(1)* %out, <2 x i16> %foo) nounwind {
10 %p0 = extractelement <2 x i16> %foo, i32 0
11 %p1 = extractelement <2 x i16> %foo, i32 1
12 %out1 = getelementptr i16, i16 addrspace(1)* %out, i32 1
13 store i16 %p1, i16 addrspace(1)* %out, align 2
14 store i16 %p0, i16 addrspace(1)* %out1, align 2
15 ret void
16 }
17
18 ; FUNC-LABEL: {{^}}extract_vector_elt_v4i16:
19 ; SI: buffer_load_ushort
20 ; SI: buffer_load_ushort
21 ; SI: buffer_store_short
22 ; SI: buffer_store_short
23 define void @extract_vector_elt_v4i16(i16 addrspace(1)* %out, <4 x i16> %foo) nounwind {
24 %p0 = extractelement <4 x i16> %foo, i32 0
25 %p1 = extractelement <4 x i16> %foo, i32 2
26 %out1 = getelementptr i16, i16 addrspace(1)* %out, i32 1
27 store i16 %p1, i16 addrspace(1)* %out, align 2
28 store i16 %p0, i16 addrspace(1)* %out1, align 2
29 ret void
30 }