Allow for switch values bigger than 64 bits.
[oota-llvm.git] / lib / Transforms / Utils / SimplifyCFG.cpp
index 80eab1c1f87c0345adbff18e130b1ed36344a72d..555e30e5f02ef83b49798beb96da11c653f8cf34 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());
   }
 };