[llvm-commits] [llvm] r104141 - /llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Bob Wilson
bob.wilson at apple.com
Wed May 19 11:48:32 PDT 2010
Author: bwilson
Date: Wed May 19 13:48:32 2010
New Revision: 104141
URL: http://llvm.org/viewvc/llvm-project?rev=104141&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=104141&r1=104140&r2=104141&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Wed May 19 13:48:32 2010
@@ -2523,6 +2523,8 @@
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) {
More information about the llvm-commits
mailing list