@@ -155,7 +155,6 @@ path_range_query::unreachable_path_p ()
}
// Return the range of STMT at the end of the path being analyzed.
-// Anything but the final conditional in a BB will return VARYING.
bool
path_range_query::range_of_stmt (irange &r, gimple *stmt, tree)
@@ -165,10 +164,9 @@ path_range_query::range_of_stmt (irange &r, gimple *stmt, tree)
if (!irange::supports_type_p (type))
return false;
- if (gimple_code (stmt) == GIMPLE_COND && fold_range (r, stmt, this))
- return true;
+ if (!fold_range (r, stmt, this))
+ r.set_varying (type);
- r.set_varying (type);
return true;
}
@@ -237,7 +235,7 @@ path_range_query::range_defined_in_block (irange &r, tree name, basic_block bb)
if (gimple_code (def_stmt) == GIMPLE_PHI)
ssa_range_in_phi (r, as_a<gphi *> (def_stmt));
- else if (!fold_range (r, def_stmt, this))
+ else if (!range_of_stmt (r, def_stmt, name))
r.set_varying (TREE_TYPE (name));
if (bb)