aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2009-04-29 18:13:31 +0000
committerNate Begeman <natebegeman@mac.com>2009-04-29 18:13:31 +0000
commita641575828192c741531d431fbf191e6c1ba17c5 (patch)
tree3797031c680bdcc73f1e129bf4f95a671dc13b23
parentc9cf35055f7b0fd5814836686b4a550dc69bd11c (diff)
Update comment, replace theoretically impossible check with an assert.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70391 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/CodeGen/SelectionDAGNodes.h14
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp4
2 files changed, 8 insertions, 10 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h
index dc7112c63a..ad485103fb 100644
--- a/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -317,13 +317,13 @@ namespace ISD {
/// IDX, which must be a multiple of the result vector length.
EXTRACT_SUBVECTOR,
- /// VECTOR_SHUFFLE(VEC1, VEC2, SHUFFLEVEC) - Returns a vector, of the same
- /// type as VEC1/VEC2. SHUFFLEVEC is a BUILD_VECTOR of constant int values
- /// (maybe of an illegal datatype) or undef that indicate which value each
- /// result element will get. The elements of VEC1/VEC2 are enumerated in
- /// order. This is quite similar to the Altivec 'vperm' instruction, except
- /// that the indices must be constants and are in terms of the element size
- /// of VEC1/VEC2, not in terms of bytes.
+ /// VECTOR_SHUFFLE(VEC1, VEC2) - Returns a vector, of the same type as
+ /// VEC1/VEC2. A VECTOR_SHUFFLE node also contains an array of constant int
+ /// values that indicate which value (or undef) each result element will
+ /// get. These constant ints are accessible through the
+ /// ShuffleVectorSDNode class. This is quite similar to the Altivec
+ /// 'vperm' instruction, except that the indices must be constants and are
+ /// in terms of the element size of VEC1/VEC2, not in terms of bytes.
VECTOR_SHUFFLE,
/// SCALAR_TO_VECTOR(VAL) - This represents the operation of loading a
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index d6a421d7a0..b33b469124 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -5731,9 +5731,7 @@ bool ShuffleVectorSDNode::isSplatMask(const int *Mask, MVT VT) {
for (i = 0, e = VT.getVectorNumElements(); i != e && Mask[i] < 0; ++i)
/* search */;
- // If we hit the end of the mask looking for a non-undef value, return false.
- if (i == e)
- return false;
+ assert(i != e && "VECTOR_SHUFFLE node with all undef indices!");
// Make sure all remaining elements are either undef or the same as the first
// non-undef value.