llvm::propagateIRFlags

Intersect IR flags from scalar ops VL onto vector op I.

Synopsis

Declared in <llvm/Transforms/Utils/LoopUtils.h>

void
propagateIRFlags(
    Value* I,
    ArrayRef<Value*> VL,
    Value* OpValue = nullptr,
    bool IncludeWrapFlags = true);

Description

Get the intersection (logical and) of all of the potential IR flags of each scalar operation (VL) that will be converted into a vector (I). If OpValue is non-null, we only consider operations similar to OpValue when intersecting. Flag set: NSW, NUW (if IncludeWrapFlags is true), exact, and all of fast-math.

Parameters

NameDescription
IVector instruction that receives the intersected flags.
VLScalar operations whose flags are intersected.
OpValueOptional prototype value; only similar ops are considered.
IncludeWrapFlagsWhether NSW/NUW wrap flags are included.