Tighten description of ISD::BUILD_VECTOR
authorCameron McInally <mcinally@cray.com>
Wed, 8 Jul 2020 19:03:50 +0000 (14:03 -0500)
committerCameron McInally <mcinally@cray.com>
Wed, 8 Jul 2020 19:06:23 +0000 (14:06 -0500)
VerifySDNode(...) in SelectionDAG.cpp shows that the operands of a BUILD_VECTOR must all be the same type. This patch cleans up the comment in ISDOpcodes.h to make that more obvious. Also, remove the requirement that the number of elements must be a power-of-2. That's not true.

Differential Revision: https://reviews.llvm.org/D83413

llvm/include/llvm/CodeGen/ISDOpcodes.h

index d3ff99d..d121a4d 100644 (file)
@@ -448,11 +448,11 @@ enum NodeType {
   FCANONICALIZE,
 
   /// BUILD_VECTOR(ELT0, ELT1, ELT2, ELT3,...) - Return a fixed-width vector
-  /// with the specified, possibly variable, elements.  The number of elements
-  /// is required to be a power of two. The types of the operands must all be
-  /// the same and must match the vector element type, except that integer types
-  /// are allowed to be larger than the element type, in which case the operands
-  /// are implicitly truncated.
+  /// with the specified, possibly variable, elements. The types of the
+  /// operands must all be the same. The types of the operands must match the
+  /// vector element type, except that integer types are allowed to be larger
+  /// than the element type, in which case the operands are implicitly
+  /// truncated.
   BUILD_VECTOR,
 
   /// INSERT_VECTOR_ELT(VECTOR, VAL, IDX) - Returns VECTOR with the element