[PATCH] [COMPILER-RT] Implement long double comparison functions

Dmitri Gribenko gribozavr at gmail.com
Wed Mar 12 05:19:49 PDT 2014

  Hi GuanHong Liu,

  Thank you for working on this!

  This set of patches looks good, but because I don't contribute regularly to compiler-rt, I will defer to other reviewers to stamp the final LGTM.


Comment at: lib/builtins/comparetf2.c:70-76
@@ +69,9 @@
+        else return LE_GREATER;
+    }
+    // Otherwise, both are negative, so we need to flip the sense of the
+    // comparison to get the correct result.  (This assumes a twos- or ones-
+    // complement integer representation; if integers are represented in a
+    // sign-magnitude representation, then this flip is incorrect).
+    else {
+        if (aInt > bInt) return LE_LESS;
Could you sink the comment into the else {} block?  It is not immediately obvious that the 'if' statement continues there.


More information about the llvm-commits mailing list