If VReg is defined by a G_CONSTANT fits in int64_t returns it.

Synopsis

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

std::optional<int64_t>
getIConstantVRegSExtVal(
    Register VReg,
    MachineRegisterInfo const& MRI);

Return Value

The sign‐extended constant as int64_t, or std::nullopt.

Parameters

Name

Description

VReg

Virtual register that may be defined by a G_CONSTANT.

MRI

Register information for the function.

Created with MrDocs