This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 71/89] Concretize gimple_cond_make_{false|true}


On Tue, 2014-04-22 at 11:37 -0400, Trevor Saunders wrote:
> > diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
> > index 902b879..62ec9f5 100644
> > --- a/gcc/tree-vrp.c
> > +++ b/gcc/tree-vrp.c
> > @@ -9517,10 +9517,11 @@ fold_predicate_in (gimple_stmt_iterator *si)
> >        else
> >  	{
> >  	  gcc_assert (gimple_code (stmt) == GIMPLE_COND);
> > +	  gimple_cond cond_stmt = stmt->as_a_gimple_cond ();
> 
> the assert isn't needed now right?

Correct.  I guess my thinking here was that the original code was
checking for it, presumably to fail early, rather than hitting the
GIMPLE_CHECK macros when calling the accessors later on, but the checked
cast to gimple_cond gives us that.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]