[SystemZ] Handle sub-128 vectors
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 5 May 2015 19:29:21 +0000 (19:29 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 5 May 2015 19:29:21 +0000 (19:29 +0000)
commit538287dea2e6ae17a0f81615097c4de0df5d1e4d
tree1a8dcc55f7ce3391e258f905e0a59c8bdba4efaf
parentcf0fa9b9dd296771a2de766c5262b96938cf13a3
[SystemZ] Handle sub-128 vectors

The ABI allows sub-128 vectors to be passed and returned in registers,
with the vector occupying the upper part of a register.  We therefore
want to legalize those types by widening the vector rather than promoting
the elements.

The patch includes some simple tests for sub-128 vectors and also tests
that we can recognize various pack sequences, some of which use sub-128
vectors as temporary results.  One of these forms is based on the pack
sequences generated by llvmpipe when no intrinsics are used.

Signed unpacks are recognized as BUILD_VECTORs whose elements are
individually sign-extended.  Unsigned unpacks can have the equivalent
form with zero extension, but they also occur as shuffles in which some
elements are zero.

Based on a patch by Richard Sandiford.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236525 91177308-0d34-0410-b5e6-96231b3b80d8
20 files changed:
lib/Target/SystemZ/SystemZCallingConv.h
lib/Target/SystemZ/SystemZCallingConv.td
lib/Target/SystemZ/SystemZISelLowering.cpp
lib/Target/SystemZ/SystemZISelLowering.h
lib/Target/SystemZ/SystemZInstrVector.td
lib/Target/SystemZ/SystemZOperators.td
test/CodeGen/SystemZ/vec-args-03.ll
test/CodeGen/SystemZ/vec-args-04.ll [new file with mode: 0644]
test/CodeGen/SystemZ/vec-args-05.ll [new file with mode: 0644]
test/CodeGen/SystemZ/vec-combine-01.ll
test/CodeGen/SystemZ/vec-combine-02.ll [new file with mode: 0644]
test/CodeGen/SystemZ/vec-const-01.ll
test/CodeGen/SystemZ/vec-const-02.ll
test/CodeGen/SystemZ/vec-const-03.ll
test/CodeGen/SystemZ/vec-const-05.ll
test/CodeGen/SystemZ/vec-move-01.ll
test/CodeGen/SystemZ/vec-move-13.ll
test/CodeGen/SystemZ/vec-move-15.ll [new file with mode: 0644]
test/CodeGen/SystemZ/vec-move-16.ll [new file with mode: 0644]
test/CodeGen/SystemZ/vec-sub-01.ll