Micro-optimize this.
[oota-llvm.git] / lib / Analysis / ScalarEvolution.cpp
index 1d6f21d3e380ea2e5b113d4efafcb414c64b9887..08831dfd227ee3e568c4f9695dbd7e9f8de3c95c 100644 (file)
@@ -505,8 +505,10 @@ namespace {
         return false;
 
       // Primarily, sort the SCEVs by their getSCEVType().
-      if (LHS->getSCEVType() != RHS->getSCEVType())
-        return LHS->getSCEVType() < RHS->getSCEVType();
+      unsigned LST = LHS->getSCEVType();
+      unsigned RST = RHS->getSCEVType();
+      if (LST != RST)
+        return LST < RST;
 
       // Then, pick an arbitrary sort. Use the profiling data for speed.
       const FoldingSetNodeIDRef &L = LHS->getProfile();