summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2006-03-19 23:56:04 +0000
committerChris Lattner <sabre@nondot.org>2006-03-19 23:56:04 +0000
commit00f0589bc04286cb6cffe5a0ba14e0a39ca116f8 (patch)
treeda7dbdd263df7a2c4e5c57ddb266a421398fa900 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent979d26080569018d799edaefda808eb3240b83d8 (diff)
downloadbcm5719-llvm-00f0589bc04286cb6cffe5a0ba14e0a39ca116f8.tar.gz
bcm5719-llvm-00f0589bc04286cb6cffe5a0ba14e0a39ca116f8.zip
Add very basic support for VECTOR_SHUFFLE
llvm-svn: 26880
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 57c423e6f99..a0ce3fb756e 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1360,6 +1360,13 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
else
return N1; // Never-taken branch
break;
+ case ISD::VECTOR_SHUFFLE:
+ assert(VT == N1.getValueType() && VT == N2.getValueType() &&
+ MVT::isVector(VT) && MVT::isVector(N3.getValueType()) &&
+ N3.getOpcode() == ISD::BUILD_VECTOR &&
+ MVT::getVectorNumElements(VT) == N3.getNumOperands() &&
+ "Illegal VECTOR_SHUFFLE node!");
+ break;
}
std::vector<SDOperand> Ops;
@@ -2615,7 +2622,6 @@ const char *SDNode::getOperationName(const SelectionDAG *G) const {
case ISD::TargetFrameIndex: return "TargetFrameIndex";
case ISD::TargetConstantPool: return "TargetConstantPool";
case ISD::TargetExternalSymbol: return "TargetExternalSymbol";
- case ISD::VBUILD_VECTOR: return "VBUILD_VECTOR";
case ISD::CopyToReg: return "CopyToReg";
case ISD::CopyFromReg: return "CopyFromReg";
@@ -2665,6 +2671,8 @@ const char *SDNode::getOperationName(const SelectionDAG *G) const {
case ISD::INSERT_VECTOR_ELT: return "insert_vector_elt";
case ISD::VINSERT_VECTOR_ELT: return "vinsert_vector_elt";
case ISD::SCALAR_TO_VECTOR: return "scalar_to_vector";
+ case ISD::VBUILD_VECTOR: return "vbuild_vector";
+ case ISD::VECTOR_SHUFFLE: return "vector_shuffle";
case ISD::ADDC: return "addc";
case ISD::ADDE: return "adde";
case ISD::SUBC: return "subc";
OpenPOWER on IntegriCloud