[PATCH] D32339: [APInt] Add compare/compareSigned methods that return -1, 0, 1. Reimplement slt/ult and friends using them

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 21 02:14:29 PDT 2017


RKSimon added inline comments.


================
Comment at: lib/Support/APInt.cpp:392
   // numbers compare correctly this way if both have the same signed-ness.
-  return ult(RHS);
+  return compare(RHS);
 }
----------------
Better to call tcCompare directly?


https://reviews.llvm.org/D32339





More information about the llvm-commits mailing list