~pali/+junk/llvm-toolchain-3.7

« back to all changes in this revision

Viewing changes to test/CodeGen/AMDGPU/extract_vector_elt_i16.ll

  • Committer: Package Import Robot
  • Author(s): Sylvestre Ledru
  • Date: 2015-07-15 17:51:08 UTC
  • Revision ID: package-import@ubuntu.com-20150715175108-l8mynwovkx4zx697
Tags: upstream-3.7~+rc2
ImportĀ upstreamĀ versionĀ 3.7~+rc2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
}