llvm::InstCombiner::targetSimplifyDemandedVectorEltsIntrinsic

Simplify demanded vector elements of a target-specific intrinsic.

Synopsis

Declared in <llvm/Transforms/InstCombine/InstCombiner.h>

std::optional<Value*>
targetSimplifyDemandedVectorEltsIntrinsic(
    IntrinsicInst& II,
    APInt DemandedElts,
    APInt& UndefElts,
    APInt& UndefElts2,
    APInt& UndefElts3,
    std::function<void(Instruction*, unsigned int, APInt, APInt&)> SimplifyAndSetOp);

Return Value

An optional simplified value, or nullopt if unchanged.

Parameters

NameDescription
IIIntrinsic whose result elements are being demanded.
DemandedEltsElements of the result that are demanded.
UndefEltsOutput mask of elements known undef/poison.
UndefElts2Additional undef/poison element mask for operand 2.
UndefElts3Additional undef/poison element mask for operand 3.
SimplifyAndSetOpCallback to simplify and rewrite an operand.