This is the mail archive of the gcc-bugs@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]

[Bug tree-optimization/55124] [4.8 Regression] ICE in find_or_generate_expression, at tree-ssa-pre.c:2803


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55124

--- Comment #6 from rguenther at suse dot de <rguenther at suse dot de> 2012-10-30 17:12:46 UTC ---
On Tue, 30 Oct 2012, vries at gcc dot gnu.org wrote:

> 
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55124
> 
> vries at gcc dot gnu.org changed:
> 
>            What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                  CC|                            |rguenth at gcc dot gnu.org
> 
> --- Comment #5 from vries at gcc dot gnu.org 2012-10-30 15:49:42 UTC ---
> tentative patch:
> ...
> Index: gcc/tree-ssa-pre.c
> ===================================================================
> --- gcc/tree-ssa-pre.c    (revision 192023)
> +++ gcc/tree-ssa-pre.c    (working copy)
> @@ -1657,6 +1657,16 @@ phi_translate_1 (pre_expr expr, bitmap_set_t set1,
>          if (result)
>            VEC_free (vn_reference_op_s, heap, newoperands);
> 
> +        if (result && TREE_CODE (result) == SSA_NAME)
> +          {
> +        gimple def_stmt = SSA_NAME_DEF_STMT (result);
> +        basic_block def_bb = gimple_bb (def_stmt);
> +        if (def_bb != pred
> +            && !dominated_by_p (CDI_DOMINATORS, pred,
> +                    def_bb))
> +          return NULL;
> +          }
> +
>          /* We can always insert constants, so if we have a partial
>             redundant constant load of another type try to translate it
>             to a constant of appropriate type.  */
> ...


Err ... certainly not.  result is a value-number, not sth to
be taken literally and its def stmt to be looked up.  See
how clean () removes names from the sets instead.


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