Floating point comparison doubt


In unordered floating point comparison before making a call for comparison proper one node called UO_F32 is generated. In targets this node is replaced with a call to __unordsf2.

My doubts here

  1. What are these UO_F32 and O_F32 nodes for?

  2. What is this function (__unordsf2) supposed to do?



uo → unordered, o → ordered.

unordered(x,y) is true if either x or y is a NaN
ordered(x,y) is true if neither x or y is a nan.

See also the CondCode enum in llvm/include/llvm/CodeGen/SelectionDAGNodes.h.