TableGen: Allow AddedComplexity values to be negative
[oota-llvm.git] / utils / TableGen / DAGISelEmitter.cpp
index 82682cd5a5adcadd22b513ab5e5f794a7fcbc8e9..e2e6ab19cba45a96870edb55e179975492852c0d 100644 (file)
@@ -94,8 +94,8 @@ struct PatternSortingPredicate {
     // Otherwise, if the patterns might both match, sort based on complexity,
     // which means that we prefer to match patterns that cover more nodes in the
     // input over nodes that cover fewer.
-    unsigned LHSSize = LHS->getPatternComplexity(CGP);
-    unsigned RHSSize = RHS->getPatternComplexity(CGP);
+    int LHSSize = LHS->getPatternComplexity(CGP);
+    int RHSSize = RHS->getPatternComplexity(CGP);
     if (LHSSize > RHSSize) return true;   // LHS -> bigger -> less cost
     if (LHSSize < RHSSize) return false;