diff --git a/gcc/gimple-range-fold.h b/gcc/gimple-range-fold.h
index bc0874b..350e2c4 100644
--- a/gcc/gimple-range-fold.h
+++ b/gcc/gimple-range-fold.h
@@ -93,6 +93,7 @@
 {
   if (exp && TREE_CODE (exp) == SSA_NAME &&
       !SSA_NAME_IS_VIRTUAL_OPERAND (exp) &&
+      !SSA_NAME_OCCURS_IN_ABNORMAL_PHI (exp) &&
       irange::supports_type_p (TREE_TYPE (exp)))
     return exp;
   return NULL_TREE;
diff --git a/gcc/gimple-range.cc b/gcc/gimple-range.cc
index 6eb3f71..85ef974 100644
--- a/gcc/gimple-range.cc
+++ b/gcc/gimple-range.cc
@@ -180,6 +180,10 @@
   int_range_max edge_range;
   gcc_checking_assert (irange::supports_type_p (TREE_TYPE (name)));
 
+  // Do not process values along abnormal or EH edges.
+  if (e->flags & (EDGE_ABNORMAL|EDGE_EH))
+    return false;
+
   unsigned idx;
   if ((idx = tracer.header ("range_on_edge (")))
     {
diff --git a/gcc/gimple-ssa-evrp.c b/gcc/gimple-ssa-evrp.c
index 437f194..7f20555 100644
--- a/gcc/gimple-ssa-evrp.c
+++ b/gcc/gimple-ssa-evrp.c
@@ -137,6 +137,9 @@
 
   tree value_of_expr (tree name, gimple *s = NULL) OVERRIDE
   {
+    // Shortcircuit subst_and_fold callbacks for abnormal ssa_names.
+    if (TREE_CODE (name) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (name))
+      return NULL;
     tree ret = m_ranger->value_of_expr (name, s);
     if (!ret && supported_pointer_equiv_p (name))
       ret = m_pta->get_equiv (name);
@@ -145,6 +148,9 @@
 
   tree value_on_edge (edge e, tree name) OVERRIDE
   {
+    // Shortcircuit subst_and_fold callbacks for abnormal ssa_names.
+    if (TREE_CODE (name) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (name))
+      return NULL;
     tree ret = m_ranger->value_on_edge (e, name);
     if (!ret && supported_pointer_equiv_p (name))
       ret = m_pta->get_equiv (name);
@@ -153,6 +159,9 @@
 
   tree value_of_stmt (gimple *s, tree name = NULL) OVERRIDE
   {
+    // Shortcircuit subst_and_fold callbacks for abnormal ssa_names.
+    if (TREE_CODE (name) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (name))
+      return NULL;
     return m_ranger->value_of_stmt (s, name);
   }
 
@@ -283,9 +292,15 @@
 hybrid_folder::value_of_expr (tree op, gimple *stmt)
 {
   tree evrp_ret = evrp_folder::value_of_expr (op, stmt);
-  tree ranger_ret = m_ranger->value_of_expr (op, stmt);
-  if (!ranger_ret && supported_pointer_equiv_p (op))
-    ranger_ret = m_pta->get_equiv (op);
+  tree ranger_ret;
+  if (TREE_CODE (op) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op))
+    ranger_ret = NULL;
+  else
+    {
+      ranger_ret = m_ranger->value_of_expr (op, stmt);
+      if (!ranger_ret && supported_pointer_equiv_p (op))
+	ranger_ret = m_pta->get_equiv (op);
+    }
   return choose_value (evrp_ret, ranger_ret);
 }
 
@@ -295,9 +310,15 @@
   // Call evrp::value_of_expr directly.  Otherwise another dual call is made
   // via hybrid_folder::value_of_expr, but without an edge.
   tree evrp_ret = evrp_folder::value_of_expr (op, NULL);
-  tree ranger_ret = m_ranger->value_on_edge (e, op);
-  if (!ranger_ret && supported_pointer_equiv_p (op))
-    ranger_ret = m_pta->get_equiv (op);
+  tree ranger_ret;
+  if (TREE_CODE (op) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op))
+    ranger_ret = NULL;
+  else
+    {
+      ranger_ret = m_ranger->value_on_edge (e, op);
+      if (!ranger_ret && supported_pointer_equiv_p (op))
+	ranger_ret = m_pta->get_equiv (op);
+    }
   return choose_value (evrp_ret, ranger_ret);
 }
 
@@ -312,7 +333,11 @@
   else
     evrp_ret = NULL_TREE;
 
-  tree ranger_ret = m_ranger->value_of_stmt (stmt, op);
+  tree ranger_ret;
+  if (op && TREE_CODE (op) == SSA_NAME && SSA_NAME_OCCURS_IN_ABNORMAL_PHI (op))
+    ranger_ret = NULL;
+  else
+    ranger_ret = m_ranger->value_of_stmt (stmt, op);
   return choose_value (evrp_ret, ranger_ret);
 }
 
diff --git a/gcc/value-query.cc b/gcc/value-query.cc
index 730a214..ab133aa 100644
--- a/gcc/value-query.cc
+++ b/gcc/value-query.cc
@@ -416,8 +416,9 @@
 value_range
 gimple_range_global (tree name)
 {
-  gcc_checking_assert (gimple_range_ssa_p (name));
   tree type = TREE_TYPE (name);
+  gcc_checking_assert (TREE_CODE (name) == SSA_NAME
+		       && irange::supports_type_p (type));
 
   if (SSA_NAME_IS_DEFAULT_DEF (name) || (cfun && cfun->after_inlining)
       || is_a<gphi *> (SSA_NAME_DEF_STMT (name)))
