summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorBob Wilson <bob.wilson@apple.com>2010-05-19 18:48:32 +0000
committerBob Wilson <bob.wilson@apple.com>2010-05-19 18:48:32 +0000
commit6a1bfd282bee95036915b06ca48dd9d8ab95b795 (patch)
treebeca9addf9c373b9423b388b0b3fa0be712b7bf8 /llvm/lib/CodeGen/SelectionDAG
parent0e0f67ec95cb0846b474b5da0e161cd2b544bad2 (diff)
downloadbcm5719-llvm-6a1bfd282bee95036915b06ca48dd9d8ab95b795.tar.gz
bcm5719-llvm-6a1bfd282bee95036915b06ca48dd9d8ab95b795.zip
When expanding a vector_shuffle, the element type may not be legal and may
need to be promoted. The BUILD_VECTOR and EXTRACT_VECTOR_ELT nodes generated here already allow the promoted type to be used without further changes, so just do the promotion. This fixes part of pr7167. llvm-svn: 104141
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
index 5d69bf8f379..62a37a5fd0a 100644
--- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
@@ -2523,6 +2523,8 @@ void SelectionDAGLegalize::ExpandNode(SDNode *Node,
EVT VT = Node->getValueType(0);
EVT EltVT = VT.getVectorElementType();
+ if (getTypeAction(EltVT) == Promote)
+ EltVT = TLI.getTypeToTransformTo(*DAG.getContext(), EltVT);
unsigned NumElems = VT.getVectorNumElements();
SmallVector<SDValue, 8> Ops;
for (unsigned i = 0; i != NumElems; ++i) {
OpenPOWER on IntegriCloud