[llvm-dev] BUILD_VECTOR disambiguation

Cameron McInally via llvm-dev llvm-dev at lists.llvm.org
Tue Jul 7 07:52:31 PDT 2020


Hey devs,

>From ISDOpcodes.h...

/// 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.
BUILD_VECTOR,

Must the operand types always be the same? Or could we see a
BUILD_VECTOR with mixed integer types? E.g.:

BUILD_VECTOR(i32, i32, i64, i32)

Thanks,
Cam


More information about the llvm-dev mailing list