title: What are ordered and unordered LLVM CmpInst compare instructions?
body: <p>The definition of <code>CmpInst::Predicate</code> type in <code>"llvm/IR/InstrTypes.h"</code> which describes the type of compare instruction in LLVM goes like this:</p>
  
  <pre><code>enum Predicate {
    // Opcode              U L G E    Intuitive operation
    FCMP_FALSE =  0,  ///&lt; 0 0 0 0    Always false (always folded)
    FCMP_OEQ   =  1,  ///&lt; 0 0 0 1    True if ordered and equal
    FCMP_OGT   =  2,  ///&lt; 0 0 1 0    True if ordered and greater than
    FCMP_OGE   =  3,  ///&lt; 0 0 1 1    True if ordered and greater than or equal
    FCMP_OLT   =  4,  ///&lt; 0 1 0 0    True if ordered and less than
    FCMP_OLE   =  5,  ///&lt; 0 1 0 1    True if ordered and less than or equal
    FCMP_ONE   =  6,  ///&lt; 0 1 1 0    True if ordered and operands are unequal
    FCMP_ORD   =  7,  ///&lt; 0 1 1 1    True if ordered (no nans)
    FCMP_UNO   =  8,  ///&lt; 1 0 0 0    True if unordered: isnan(X) | isnan(Y)
    FCMP_UEQ   =  9,  ///&lt; 1 0 0 1    True if unordered or equal
    FCMP_UGT   = 10,  ///&lt; 1 0 1 0    True if unordered or greater than
    FCMP_UGE   = 11,  ///&lt; 1 0 1 1    True if unordered, greater than, or equal
    FCMP_ULT   = 12,  ///&lt; 1 1 0 0    True if unordered or less than
    FCMP_ULE   = 13,  ///&lt; 1 1 0 1    True if unordered, less than, or equal
    FCMP_UNE   = 14,  ///&lt; 1 1 1 0    True if unordered or not equal
    FCMP_TRUE  = 15,  ///&lt; 1 1 1 1    Always true (always folded)
    FIRST_FCMP_PREDICATE = FCMP_FALSE,
    LAST_FCMP_PREDICATE = FCMP_TRUE,
    BAD_FCMP_PREDICATE = FCMP_TRUE + 1,
    ICMP_EQ    = 32,  ///&lt; equal
    ICMP_NE    = 33,  ///&lt; not equal
    ICMP_UGT   = 34,  ///&lt; unsigned greater than
    ICMP_UGE   = 35,  ///&lt; unsigned greater or equal
    ICMP_ULT   = 36,  ///&lt; unsigned less than
    ICMP_ULE   = 37,  ///&lt; unsigned less or equal
    ICMP_SGT   = 38,  ///&lt; signed greater than
    ICMP_SGE   = 39,  ///&lt; signed greater or equal
    ICMP_SLT   = 40,  ///&lt; signed less than
    ICMP_SLE   = 41,  ///&lt; signed less or equal
    FIRST_ICMP_PREDICATE = ICMP_EQ,
    LAST_ICMP_PREDICATE = ICMP_SLE,
    BAD_ICMP_PREDICATE = ICMP_SLE + 1
  };
  </code></pre>
  
  <p>I am wondering what are "ordered" and "unordered" predicates (like "if ordered and equal" or "if unordered, greater than, or equal" compared to the normal ones that are just "unsigned greater or equal").</p>