On Thu, Mar 29, 2012 at 12:02 PM, Bin.Cheng <amker.ch...@gmail.com> wrote:
> Hi,
> Following is the tree dump of 094t.pre for a test program.
> Question is loads of D.5375_12/D.5375_14 are redundant on path <bb2,
> bb7, bb5, bb6>,
> but why not lowered into basic block 3, where it is used.
>
> BTW, seems no tree pass handles this case currently.

tree-ssa-sink.c should do this.

> Any idea? Thanks
>
>  int z$imag;
>  int z$real;
>  int D.5378;
>  int D.5377;
>  int D.5376;
>  int D.5375;
>
> <bb 2>:
>  D.5375_11 = REALPART_EXPR <g2>;
>  D.5376_12 = IMAGPART_EXPR <g2>;
>  D.5377_13 = REALPART_EXPR <g3>;
>  D.5378_14 = IMAGPART_EXPR <g3>;
>  if (D.5375_11 == D.5377_13)
>    goto <bb 3>;
>  else
>    goto <bb 7>;
>
> <bb 3>:
>  if (D.5376_12 == D.5378_14)
>    goto <bb 4>;
>  else
>    goto <bb 7>;
>
> <bb 4>:
>  z$real_15 = REALPART_EXPR <g1>;
>  z$imag_16 = IMAGPART_EXPR <g1>;
>  goto <bb 6>;
>
> <bb 7>:
>
> <bb 5>:
>  z$real_17 = REALPART_EXPR <g4>;
>  z$imag_18 = IMAGPART_EXPR <g4>;
>
> <bb 6>:
>  # z$real_19 = PHI <z$real_15(4), z$real_17(5)>
>  # z$imag_20 = PHI <z$imag_16(4), z$imag_18(5)>
>  REALPART_EXPR <g1> = z$real_19;
>  IMAGPART_EXPR <g1> = z$imag_20;
>  return 0;
>
> --
> Best Regards.

Reply via email to