llvm::BinaryOperator::CreateWithCopiedFlags

Create a binary instruction and copy IR flags from CopyO.

Synopsis

Declared in <llvm/IR/InstrTypes.h>

static
BinaryOperator*
CreateWithCopiedFlags(
    BinaryOps Opc,
    Value* V1,
    Value* V2,
    Value* CopyO,
    Twine const& Name = "",
    InsertPosition InsertBefore = nullptr);

Description

Copies overflow, fast-math, and other IR flags from the source instruction.

Return Value

The newly created binary operator.

Parameters

NameDescription
OpcThe binary opcode.
V1The first operand value.
V2The second operand value.
CopyOInstruction whose IR flags are copied.
NameOptional name for the new instruction.
InsertBeforeOptional insertion point for the new instruction.