On Fri, Jan 24, 2014 at 09:35:10AM -0700, Jeff Law wrote: > On 01/24/14 03:52, Jakub Jelinek wrote: > >On Thu, Jan 23, 2014 at 02:22:35PM -0700, Jeff Law wrote: > >>--- a/gcc/tree-vrp.c > >>+++ b/gcc/tree-vrp.c > >>@@ -5891,8 +5891,13 @@ find_assert_locations_1 (basic_block bb, sbitmap > >>live) > >> } > >> } > >> > >>- register_new_assert_for (op, op, comp_code, value, bb, NULL, si); > >>- need_assert = true; > >>+ /* Do not register any assertions for a non-returning call. */ > >>+ if (!is_gimple_call (stmt) || !gimple_call_noreturn_p (stmt)) > >>+ { > >>+ register_new_assert_for (op, op, comp_code, > >>+ value, bb, NULL, si); > >>+ need_assert = true; > >>+ } > >> } > >> } > > > >I'd say this belongs into infer_value_range instead. > Seems reasonable. I'll spin that. > > The only downside is we lose the ability to backward propagate > through a typecast which feeds an argument in such a call. But > that's probably not a big deal.
I couldn't actually reproduce any backwards propagation, since now all pointer casts are useless, so the code to walk the pointer casts is likely just dead. Jakub