[SystemZ] Fix assertion failure in tryBuildVectorShuffle
authorUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 15 Sep 2015 14:27:46 +0000 (14:27 +0000)
committerUlrich Weigand <ulrich.weigand@de.ibm.com>
Tue, 15 Sep 2015 14:27:46 +0000 (14:27 +0000)
commit1be5e0b1695a12534b8f8c64e83d5c2017201d5a
tree43853116cedeb70a7d9d7668e44dc6fed9353701
parent9781f90c7e04d89a47f9cb97487d49c5d329bc7b
[SystemZ] Fix assertion failure in tryBuildVectorShuffle

Under certain circumstances, tryBuildVectorShuffle would attempt to
create a BUILD_VECTOR node with an invalid combination of types.
This happened when one of the components of the original BUILD_VECTOR
was itself a TRUNCATE node.  That TRUNCATE was stripped off during
intermediate processing to simplify code, but when adding the node
back to the result vector, we still need it to get the type right.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247694 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/SystemZ/SystemZISelLowering.cpp
test/CodeGen/SystemZ/vec-perm-12.ll [new file with mode: 0644]