2015-01-06 18:00:21 +00:00
|
|
|
; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs< %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
|
2014-04-23 19:45:05 +00:00
|
|
|
|
2014-10-01 17:15:17 +00:00
|
|
|
; FUNC-LABEL: {{^}}extract_vector_elt_v2i16:
|
2014-11-05 14:50:53 +00:00
|
|
|
; SI: buffer_load_ushort
|
|
|
|
; SI: buffer_load_ushort
|
|
|
|
; SI: buffer_store_short
|
|
|
|
; SI: buffer_store_short
|
2014-04-23 19:45:05 +00:00
|
|
|
define void @extract_vector_elt_v2i16(i16 addrspace(1)* %out, <2 x i16> %foo) nounwind {
|
|
|
|
%p0 = extractelement <2 x i16> %foo, i32 0
|
|
|
|
%p1 = extractelement <2 x i16> %foo, i32 1
|
|
|
|
%out1 = getelementptr i16 addrspace(1)* %out, i32 1
|
|
|
|
store i16 %p1, i16 addrspace(1)* %out, align 2
|
|
|
|
store i16 %p0, i16 addrspace(1)* %out1, align 2
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-10-01 17:15:17 +00:00
|
|
|
; FUNC-LABEL: {{^}}extract_vector_elt_v4i16:
|
2014-11-05 14:50:53 +00:00
|
|
|
; SI: buffer_load_ushort
|
|
|
|
; SI: buffer_load_ushort
|
|
|
|
; SI: buffer_store_short
|
|
|
|
; SI: buffer_store_short
|
2014-04-23 19:45:05 +00:00
|
|
|
define void @extract_vector_elt_v4i16(i16 addrspace(1)* %out, <4 x i16> %foo) nounwind {
|
|
|
|
%p0 = extractelement <4 x i16> %foo, i32 0
|
|
|
|
%p1 = extractelement <4 x i16> %foo, i32 2
|
|
|
|
%out1 = getelementptr i16 addrspace(1)* %out, i32 1
|
|
|
|
store i16 %p1, i16 addrspace(1)* %out, align 2
|
|
|
|
store i16 %p0, i16 addrspace(1)* %out1, align 2
|
|
|
|
ret void
|
|
|
|
}
|