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] Rewrite store-motion and invariant motion to use an alias-oracle


Hi,

>     void **slot;
>     struct name_expansion *exp;
>   
> !   aff_combination_zero (&to_add, comb->type);
>     for (i = 0; i < comb->n; i++)
>       {
>         e = comb->elts[i].val;
> +       /* We can strip extensions as we re-apply them after expansion.  */
> +       if (TREE_CODE (e) == NOP_EXPR
> + 	  && (TYPE_PRECISION (TREE_TYPE (e))
> + 	      >= TYPE_PRECISION (TREE_TYPE (TREE_OPERAND (e, 0)))))
> + 	e = TREE_OPERAND (e, 0);
>         if (TREE_CODE (e) != SSA_NAME)
>   	continue;
>         def = SSA_NAME_DEF_STMT (e);
> *************** tree_to_aff_combination_expand (tree exp
> *** 632,639 ****
>   	 COMB while traversing it; include the term -coef * E, to remove
>            it from COMB.  */
>         scale = comb->elts[i].coef;
> !       aff_combination_zero (&curre, type);
> !       aff_combination_add_elt (&curre, e, double_int_neg (scale));
>         aff_combination_scale (&current, scale);
>         aff_combination_add (&to_add, &current);
>         aff_combination_add (&to_add, &curre);
> --- 628,636 ----
>   	 COMB while traversing it; include the term -coef * E, to remove
>            it from COMB.  */
>         scale = comb->elts[i].coef;
> !       aff_combination_zero (&curre, comb->type);
> !       aff_combination_add_elt (&curre, comb->elts[i].val,
> ! 			       double_int_neg (scale));
>         aff_combination_scale (&current, scale);
>         aff_combination_add (&to_add, &current);
>         aff_combination_add (&to_add, &curre);

it seems do you do not actually reapply the extension as you promise
in the comment above?

Zdenek


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