Lines Matching defs:Comparison
42 // Represents information about a comparison.
43 struct Comparison {
44 Comparison(SDValue Op0In, SDValue Op1In)
47 // The operands to the comparison.
1444 // CC is a comparison that will be implemented using an integer or
1445 // floating-point comparison. Return the condition code mask for
1539 // If C can be converted to a comparison against zero, adjust the operands
1541 static void adjustZeroCmp(SelectionDAG &DAG, SDLoc DL, Comparison &C) {
1559 // If a comparison described by C is suitable for CLI(Y), CHHSI or CLHHSI,
1561 static void adjustSubwordCmp(SelectionDAG &DAG, SDLoc DL, Comparison &C) {
1562 // For us to make any changes, it must a comparison between a single-use
1586 // Unsigned comparison between two sign-extended values is equivalent
1587 // to unsigned comparison between two zero-extended values.
1590 // Try to treat the comparison as unsigned, so that we can use CLI.
1606 // If the constant is in range, we can use any comparison.
1653 static bool shouldSwapCmpOperands(const Comparison &C) {
1710 // Return a version of comparison CC mask CCMask in which the LT and GT
1722 static void adjustForSubtraction(SelectionDAG &DAG, SDLoc DL, Comparison &C) {
1742 static void adjustForFNeg(Comparison &C) {
1760 // This case is important because InstCombine transforms a comparison
1761 // with (sext (trunc X)) into a comparison with (shl X, 32).
1762 static void adjustForLTGFR(Comparison &C) {
1763 // Check for a comparison between (shl X, 32) and 0.
1787 static void adjustICmpTruncate(SelectionDAG &DAG, SDLoc DL, Comparison &C) {
1822 // a comparison of type Opcode between the AND result and CmpVal.
1823 // CCMask says which comparison result is being tested and BitSize is
1918 static void adjustForTestUnderMask(SelectionDAG &DAG, SDLoc DL, Comparison &C) {
1919 // Check that we have a comparison with a constant.
1926 Comparison NewC(C);
1939 // comparison with an i64 immediate.
1961 // Check whether the combination of mask, comparison value and comparison
2001 // Return a Comparison that tests the condition-code result of intrinsic
2002 // node Call against constant integer CC using comparison code Cond.
2005 static Comparison getIntrinsicCmp(SelectionDAG &DAG, unsigned Opcode,
2008 Comparison C(Call, SDValue());
2032 llvm_unreachable("Unexpected integer comparison type");
2037 // Decide how to implement a comparison of type Cond between CmpOp0 with CmpOp1.
2038 static Comparison getCmp(SelectionDAG &DAG, SDValue CmpOp0, SDValue CmpOp1,
2052 Comparison C(CmpOp0, CmpOp1);
2061 // Choose the type of comparison. Equality and inequality tests can
2091 // Emit the comparison instruction described by C.
2092 static SDValue emitCmp(SelectionDAG &DAG, SDLoc DL, Comparison &C) {
2103 llvm_unreachable("Invalid comparison operands");
2176 // Return the SystemISD vector comparison operation for CC, or 0 if it cannot
2178 // integer comparison.
2201 // Return the SystemZISD vector comparison operation for CC or its inverse,
2204 // floating-point rather than integer comparison.
2230 // Build a comparison of vectors CmpOp0 and CmpOp1 using opcode Opcode,
2248 // Lower a vector comparison of type CC between CmpOp0 and CmpOp1, producing
2261 assert(IsFP && "Unexpected integer comparison");
2272 assert(IsFP && "Unexpected integer comparison");
2279 // Otherwise a single comparison is enough. It doesn't really
2290 llvm_unreachable("Unhandled comparison");
2313 Comparison C(getCmp(DAG, CmpOp0, CmpOp1, CC, DL));
2325 Comparison C(getCmp(DAG, CmpOp0, CmpOp1, CC, DL));
2363 Comparison C(getCmp(DAG, CmpOp0, CmpOp1, CC, DL));
2366 // where the comparison value is sign-extended (for LPGFR and LNGFR).
5278 // comparison value with those that we loaded,
5279 // so that we can use a full word comparison.