On Tue, Nov 27, 2012 at 5:00 PM, Paolo Bonzini wrote:
> Note that the bug is present on older branches too, but it became much
> worse sometime between 4.4 and 4.7.
Probably around the time we (i.e. you and me) taught gcse.c to handle
REG_EQUAL expressions?
> 2012-11-26 Paolo Bonzini <>
>
> PR rtl-optimization/55489
> * gcse.c (compute_transp): Precompute a canonical version
> of XEXP (x, 0), and pass it to canon_true_dependence.
>
> Index: gcse.c
> ===================================================================
> --- gcse.c (revisione 193848)
> +++ gcse.c (copia locale)
> @@ -1658,7 +1658,11 @@ compute_transp (const_rtx x, int indx, sbitmap *bm
> {
> bitmap_iterator bi;
> unsigned bb_index;
> + rtx x_addr;
>
> + x_addr = get_addr (XEXP (x, 0));
> + x_addr = canon_rtx (x_addr);
> +
> /* First handle all the blocks with calls. We don't need to
> do any list walking for them. */
> EXECUTE_IF_SET_IN_BITMAP (blocks_with_calls, 0, bb_index, bi)
> @@ -1683,7 +1687,7 @@
> rtx dest_addr = pair->dest_addr;
>
> if (canon_true_dependence (dest, GET_MODE (dest),
> - dest_addr, x, NULL_RTX))
> + dest_addr, x, x_addr))
> RESET_BIT (bmap[bb_index], indx);
> }
> }
I can't approve it, but this looks OK to me.
Maybe properly re-indent this block of code while at it?
Ciao!
Steven