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

Description

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

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

Parameters

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