llvm::getLCMType

Return the least common multiple type of OrigTy and TargetTy.

Synopsis

Declared in <llvm/CodeGen/GlobalISel/Utils.h>

LLT
getLCMType(
    LLT OrigTy,
    LLT TargetTy);

Description

Changes the number of vector elements or scalar bitwidth. The intent is a G_MERGE_VALUES, G_BUILD_VECTOR, or G_CONCAT_VECTORS can be constructed from OrigTy elements, and unmerged into TargetTy. It is an error to call this function where one argument is a fixed vector and the other is a scalable vector, since it is illegal to build a G_{MERGE|UNMERGE}_VALUES between fixed and scalable vectors.

Return Value

The least common multiple type of OrigTy and TargetTy.

Parameters

NameDescription
OrigTyOriginal type being widened or reshaped.
TargetTyTarget type that must be covered by the LCM type.