llvm::getSrcRegIgnoringCopies

Find the source register for Reg, folding away any trivial copies.

Synopsis

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

Register
getSrcRegIgnoringCopies(
    Register Reg,
    MachineRegisterInfo const& MRI);

Description

It will be an output register of the instruction that getDefIgnoringCopies returns. May return an invalid register if Reg is not a generic virtual register.

Also walks through hints such as G_ASSERT_ZEXT.

Return Value

The underlying source register, or an invalid register.

Parameters

NameDescription
RegVirtual register whose source is sought.
MRIRegister information for the function.