llvm::TargetRegisterInfo::composeSubRegIndices

Return the subregister index you get from composing two subregister indices.

Synopsis

Declared in <llvm/CodeGen/TargetRegisterInfo.h>

unsigned int
composeSubRegIndices(
    unsigned int a,
    unsigned int b) const;

Description

The special null sub-register index composes as the identity.

If R:a:b is the same register as R:c, then composeSubRegIndices(a, b) returns c. Note that composeSubRegIndices does not tell you about illegal compositions. If R does not have a subreg a, or R:a does not have a subreg b, composeSubRegIndices doesn't tell you.

The ARM register Q0 has two D subregs dsub_0:D0 and dsub_1:D1. It also has ssub_0:S0 - ssub_3:S3 subregs. If you compose subreg indices dsub_1, ssub_0 you get ssub_2.

Return Value

The composed sub-register index of a and b.

Parameters

NameDescription
aFirst sub-register index.
bSecond sub-register index.