aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/Analysis/ScalarEvolution.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 1d6f21d..08831df 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -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();