diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-04-23 19:45:05 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2014-04-23 19:45:05 +0000 |
commit | 4c6ab696e24649f8fc4843269f37f4a5466533bb (patch) | |
tree | 66531f9b4ccbe2a6716392a3924fbed5d049e661 | |
parent | 05e736fb8acfb636be12a71c2aa116d924502c1c (diff) | |
download | bcm5719-llvm-4c6ab696e24649f8fc4843269f37f4a5466533bb.tar.gz bcm5719-llvm-4c6ab696e24649f8fc4843269f37f4a5466533bb.zip |
R600: Add a test that used to be broken that I forgot to add
llvm-svn: 207017
-rw-r--r-- | llvm/test/CodeGen/R600/extract_vector_elt_i16.ll | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/llvm/test/CodeGen/R600/extract_vector_elt_i16.ll b/llvm/test/CodeGen/R600/extract_vector_elt_i16.ll new file mode 100644 index 00000000000..e1b038a139e --- /dev/null +++ b/llvm/test/CodeGen/R600/extract_vector_elt_i16.ll @@ -0,0 +1,29 @@ +; RUN: llc -march=r600 -mcpu=SI < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s + +; FUNC-LABEL: @extract_vector_elt_v2i16 +; SI: BUFFER_LOAD_USHORT +; SI: BUFFER_STORE_SHORT +; SI: BUFFER_LOAD_USHORT +; 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_STORE_SHORT +; SI: BUFFER_LOAD_USHORT +; 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 +} |