Make sorting of ConstantInt be APInt clean through use of ult function.
authorReid Spencer <rspencer@reidspencer.com>
Fri, 2 Mar 2007 23:01:14 +0000 (23:01 +0000)
committerReid Spencer <rspencer@reidspencer.com>
Fri, 2 Mar 2007 23:01:14 +0000 (23:01 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34853 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/SimplifyCFG.cpp

index 92b0a9d5cda9f3a03ce99779d36e1dd5c77f02ad..91664bf2d9d9d93f71c7a2ef3e3b9f682cdcdbc3 100644 (file)
@@ -1167,7 +1167,7 @@ namespace {
   /// applications that sort ConstantInt's to ensure uniqueness.
   struct ConstantIntOrdering {
     bool operator()(const ConstantInt *LHS, const ConstantInt *RHS) const {
-      return LHS->getZExtValue() < RHS->getZExtValue();
+      return LHS->getValue().ult(RHS->getValue());
     }
   };
 }