llvm::PatternMatch::BinaryOp_match

Matches a BinaryOperator with a fixed Opcode against operand patterns.

Synopsis

Declared in <llvm/IR/PatternMatch.h>

template<
    typename LHS_t,
    typename RHS_t,
    unsigned int Opcode,
    bool Commutable = false>
struct BinaryOp_match;

Member Functions

NameDescription
BinaryOp_match [constructor]Construct a matcher for both operands.
match match overloads

Data Members

NameDescription
L Sub-pattern for the left-hand operand.
R Sub-pattern for the right-hand operand.

Non-Member Functions

NameDescription
m_AShrMatches an ashr of L and R.
m_AddMatches an add of L and R.
m_AddLikeMatch either "add" or "or disjoint".
m_AndMatches an and of L and R.
m_FAddMatches an fadd of L and R.
m_FDivMatches an fdiv of L and R.
m_FMulMatches an fmul of L and R.
m_FNegNSZMatch 'fneg X' as 'fsub +-0.0, X'.
m_FRemMatches an frem of L and R.
m_FSubMatches an fsub of L and R.
m_LShrMatches an lshr of L and R.
m_MulMatches a mul of L and R.
m_NegMatches a 'Neg' as 'sub 0, V'.
m_NotMatches a 'Not' as 'xor V, -1' or 'xor -1, V'. NOTE: we first match the 'Not' (by matching '-1'), and only then match the inner matcher!
m_NotForbidPoisonMatches a 'Not' as 'xor V, -1' without allowing poison in the all-ones.
m_OrMatches an or of L and R.
m_SDivMatches an sdiv of L and R.
m_SRemMatches an srem of L and R.
m_ShlMatches a shl of L and R.
m_SubMatches a sub of L and R.
m_UDivMatches a udiv of L and R.
m_URemMatches a urem of L and R.
m_XorMatches an xor of L and R.
m_c_AddMatches a Add with LHS and RHS in either order.
m_c_AndMatches an And with LHS and RHS in either order.
m_c_FAddMatches FAdd with LHS and RHS in either order.
m_c_FMulMatches FMul with LHS and RHS in either order.
m_c_MulMatches a Mul with LHS and RHS in either order.
m_c_OrMatches an Or with LHS and RHS in either order.
m_c_XorMatches an Xor with LHS and RHS in either order.

Derived Classes

NameDescription
SpecificBinaryOp_match Matches a BinaryOperator whose opcode is supplied at construction time.