ΒΆOptional<llvm::ValueAndVReg>
getIConstantVRegValWithLookThrough(
    llvm::Register VReg,
    const llvm::MachineRegisterInfo& MRI,
    bool LookThroughInstrs = true)

Description

If \p VReg is defined by a statically evaluable chain of instructions rooted on a G_CONSTANT returns its APInt value and def register.

Declared at: llvm/include/llvm/CodeGen/GlobalISel/Utils.h:186

Parameters

llvm::Register VReg
const llvm::MachineRegisterInfo& MRI
bool LookThroughInstrs = true