Comparison condition codes for SETCC and related SelectionDAG nodes.

Synopsis

Declared in <llvm/CodeGen/ISDOpcodes.h>

enum CondCode;

Description

These are ordered carefully to make the bitfields below work out, when considering SETFALSE (something that never exists dynamically) as 0. "U" ‐> Unsigned (for integer operands) or Unordered (for floating point), "L" ‐> Less than, "G" ‐> Greater than, "E" ‐> Equal to. If the "N" column is 1, the result of the comparison is undefined if the input is a NAN.

All of these (except for the 'always folded ops') should be handled for floating point. For integer, only the SETEQ,SETNE,SETLT,SETLE,SETGT, SETGE,SETULT,SETULE,SETUGT, and SETUGE opcodes are used.

Note that these are laid out in a specific order to allow bit‐twiddling to transform conditions.

Members

Name

Description

SETFALSE

Always false (always folded).

SETOEQ

True if ordered and equal.

SETOGT

True if ordered and greater than.

SETOGE

True if ordered and greater than or equal.

SETOLT

True if ordered and less than.

SETOLE

True if ordered and less than or equal.

SETONE

True if ordered and operands are unequal.

SETO

True if ordered (no nans).

SETUO

True if unordered: isnan(X) | isnan(Y).

SETUEQ

True if unordered or equal.

SETUGT

True if unordered or greater than.

SETUGE

True if unordered, greater than, or equal.

SETULT

True if unordered or less than.

SETULE

True if unordered, less than, or equal.

SETUNE

True if unordered or not equal.

SETTRUE

Always true (always folded).

SETFALSE2

Always false (always folded); NaN behavior don't‐care.

SETEQ

True if equal; NaN behavior don't‐care.

SETGT

True if greater than; NaN behavior don't‐care.

SETGE

True if greater than or equal; NaN behavior don't‐care.

SETLT

True if less than; NaN behavior don't‐care.

SETLE

True if less than or equal; NaN behavior don't‐care.

SETNE

True if not equal; NaN behavior don't‐care.

SETTRUE2

Always true (always folded); NaN behavior don't‐care.

SETCC_INVALID

Marker value for an invalid or unrepresentable condition code.

Non-Member Functions

Name

Description

getSetCCAndOperation

Return the SetCC opcode equivalent to X op1 Y) & (X op2 Y.

getSetCCInverse

Return the operation corresponding to !(X op Y), where 'op' is a valid SetCC operation.

getSetCCOrOperation

Return the SetCC opcode equivalent to X op1 Y) | (X op2 Y.

getSetCCSwappedOperands

Return the operation corresponding to (Y op X) when given the operation for (X op Y).

getUnorderedFlavor

Classify how Cond behaves when an operand is NaN.

isFPEqualitySetCC

Return true if this is a setcc instruction that performs an equality comparison when used with floating point operands.

isIntEqualitySetCC

Return true if this is a setcc instruction that performs an equality comparison when used with integer operands.

isSignedIntSetCC

Return true if this is a setcc instruction that performs a signed comparison when used with integer operands.

isTrueWhenEqual

Return true if Cond is true when its operands are equal.

isUnsignedIntSetCC

Return true if this is a setcc instruction that performs an unsigned comparison when used with integer operands.

GlobalISel::getSetCCInverse

Return the SetCC opcode for !(X op Y) under GlobalISel type rules.

::llvm::getFCmpCodeWithoutNaN

getFCmpCodeWithoutNaN ‐ Given an ISD condition code comparing floats, return the equivalent code if we're allowed to assume that NaNs won't occur.

::llvm::getFCmpCondCode

Return the ISD condition code for an LLVM IR floating‐point predicate.

::llvm::getICmpCondCode

getICmpCondCode ‐ Return the ISD condition code corresponding to the given LLVM IR integer condition code.

::llvm::getICmpCondCode

getICmpCondCode ‐ Return the LLVM IR integer condition code corresponding to the given ISD integer condition code.

::llvm::SDPatternMatch::m_CondCode

Match any conditional code SDNode and return its ISD::CondCode value.

::llvm::SDPatternMatch::m_SpecificCondCode

Match a conditional code SDNode with a specific ISD::CondCode.

Created with MrDocs