canCreateUndefOrPoison overloads

Synopses

Declared in <llvm/Analysis/ValueTracking.h>

canCreateUndefOrPoison returns true if Op can create undef or poison from non‐undef & non‐poison operands. For vectors, canCreateUndefOrPoison returns true if there is potential poison or undef in any element of the result when vectors without undef/poison poison are given as operands. For example, given Op = shl <2 x i32> %x, <0, 32>, this function returns true. If Op raises immediate UB but never creates poison or undef (e.g. sdiv I, 0), canCreatePoison returns false.

bool
canCreateUndefOrPoison(
    Operator const* Op,
    bool ConsiderFlagsAndMetadata = true);

Returns true if Reg can create undef or poison from non‐undef & non‐poison operands. ConsiderFlagsAndMetadata controls whether poison producing flags and metadata on the instruction are considered. This can be used to see if the instruction could still introduce undef or poison even without poison generating flags and metadata which might be on the instruction.

bool
canCreateUndefOrPoison(
    Register Reg,
    MachineRegisterInfo const& MRI,
    bool ConsiderFlagsAndMetadata = true);

Created with MrDocs