summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2019-05-28 12:52:57 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2019-05-28 12:52:57 +0000
commit57e267a2e92a7744df043c740cb946952c05ede8 (patch)
tree1edd5fee3b9af9256b739fada22571be37c3560c /llvm/lib/CodeGen/SelectionDAG
parent19e91253c0a5e021697f9271c299d6816cbab642 (diff)
downloadbcm5719-llvm-57e267a2e92a7744df043c740cb946952c05ede8.tar.gz
bcm5719-llvm-57e267a2e92a7744df043c740cb946952c05ede8.zip
[X86] Custom lower CONCAT_VECTORS of v2i1
The generic legalizer cannot handle this. Add an assert instead of silently miscompiling vectors with elements smaller than 8 bits. llvm-svn: 361814
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 52ae1e01a9e..19baf178f12 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -1415,6 +1415,7 @@ SDValue SelectionDAGLegalize::ExpandVectorBuildThroughStack(SDNode* Node) {
// Emit a store of each element to the stack slot.
SmallVector<SDValue, 8> Stores;
unsigned TypeByteSize = EltVT.getSizeInBits() / 8;
+ assert(TypeByteSize > 0 && "Vector element type too small for stack store!");
// Store (in the right endianness) the elements to memory.
for (unsigned i = 0, e = Node->getNumOperands(); i != e; ++i) {
// Ignore undef elements.
OpenPOWER on IntegriCloud