OSDN Git Service

Allow for switch values bigger than 64 bits.
authorDale Johannesen <dalej@apple.com>
Thu, 12 Mar 2009 01:20:06 +0000 (01:20 +0000)
committerDale Johannesen <dalej@apple.com>
Thu, 12 Mar 2009 01:20:06 +0000 (01:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66751 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Utils/SimplifyCFG.cpp

index 80eab1c..555e30e 100644 (file)
@@ -725,7 +725,7 @@ static bool SimplifyEqualityComparisonWithOnlyPredecessor(TerminatorInst *TI,
 class Sorter {
 public:
   bool operator() (ConstantInt * const &p, ConstantInt * const &q) const {
-    return p->getSExtValue() < q->getSExtValue();
+    return p->getValue().slt(q->getValue());
   }
 };