mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
c9c70b1651
This currently has a noticable effect on the kernel argument loads. LDS and global loads are more problematic, I think because of how copies are currently inserted to ensure that the address is a VGPR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214942 91177308-0d34-0410-b5e6-96231b3b80d8
30 lines
1.1 KiB
LLVM
30 lines
1.1 KiB
LLVM
; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs< %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
|
|
|
|
; FUNC-LABEL: @extract_vector_elt_v2i16
|
|
; SI: BUFFER_LOAD_USHORT
|
|
; SI: BUFFER_LOAD_USHORT
|
|
; SI: BUFFER_STORE_SHORT
|
|
; SI: BUFFER_STORE_SHORT
|
|
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
|
|
}
|
|
|
|
; FUNC-LABEL: @extract_vector_elt_v4i16
|
|
; SI: BUFFER_LOAD_USHORT
|
|
; SI: BUFFER_LOAD_USHORT
|
|
; SI: BUFFER_STORE_SHORT
|
|
; SI: BUFFER_STORE_SHORT
|
|
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
|
|
}
|