llvm::mustTriggerUB

Return true if I must trigger UB when any of KnownPoison is poison.

Synopsis

Declared in <llvm/Analysis/ValueTracking.h>

bool
mustTriggerUB(
    Instruction const* I,
    SmallPtrSetImpl<Value const*> const& KnownPoison);

Description

That is, undefined behavior occurs when I is executed with any operands which appear in KnownPoison holding a poison value at the point of execution.

Return Value

True if executing I must trigger undefined behavior.

Parameters

NameDescription
IInstruction that may trigger UB on poison operands.
KnownPoisonValues already known to be poison at I.