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.
Details
Details
Diff Detail
Diff Detail
Event Timeline
llvm/include/llvm/CodeGen/ISDOpcodes.h | ||
---|---|---|
452 | While you're here can you drop "The number of elements is required to be a power of two." That's not true. |
Comment Actions
I'd move the "all types must be the same" to the end, so that it doesn't look like the exception overrides it, i.e. something like
The types of the operands must match the vector element type, except that for integer types the operands are allowed to be of a larger type than the element type, in which case the operands are implicitly truncated. In any case, all operands must have the same type.
Comment Actions
Thanks, @kparzysz . I like that idea. Pushed 898065a7b879f204874820f16e4e16ea2a961de0. Would you review post-commit?
Unfortunately, I missed your quoted recommendation until just now. My email client hid it. Are you okay with it as-is?
While you're here can you drop "The number of elements is required to be a power of two." That's not true.