This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 71/89] Concretize gimple_cond_make_{false|true}
- From: David Malcolm <dmalcolm at redhat dot com>
- To: Trevor Saunders <tsaunders at mozilla dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 22 Apr 2014 13:16:55 -0400
- Subject: Re: [PATCH 71/89] Concretize gimple_cond_make_{false|true}
- Authentication-results: sourceware.org; auth=none
- References: <1398099480-49147-1-git-send-email-dmalcolm at redhat dot com> <1398099480-49147-72-git-send-email-dmalcolm at redhat dot com> <20140422153751 dot GA17441 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com>
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.