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] Fix ACATS cc50a01 at -O


On Sun, Apr 20, 2008 at 1:42 PM, Eric Botcazou <ebotcazou@adacore.com> wrote:
> Hi,
>
>  This is a bad interaction between VIEW_CONVERT_EXPR and the tree SRA pass.
>  When sra_walk_expr runs into a VIEW_CONVERT_EXPR or NOP_EXPR, it deems the
>  expression an access to the whole object:
>
>       case VIEW_CONVERT_EXPR:
>       case NOP_EXPR:
>         /* Similarly, a view/nop explicitly wants to look at an object in a
>            type other than the one we've scalarized.  */
>         goto use_all;
>
>  There is a problem when VIEW_CONVERT_EXPR is on the LHS because an access to
>  the whole object means a killing def and this is not necessarily true:
>
>   D.1939 ={v} VIEW_CONVERT_EXPR<struct fc50a00__count_type>(*D.1935_7);
>   R63b ={v} {};
>   R63b.F ={v} D.1939;
>  [...]
>   VIEW_CONVERT_EXPR<struct fc50a00__count_type>(R63b.F)._tag ={v} D.1941_9;
>
>  is obviously not a killing def for R63b.F, yet it is scalarized as if it was:
>
>   SR.32_16 = VIEW_CONVERT_EXPR<struct fc50a00__count_type>(*D.1935_7).count;
>   SR.31_17 = VIEW_CONVERT_EXPR<struct fc50a00__count_type>(*D.1935_7)._tag;
>  [...]
>   SR.30_20 = SR.32_16;
>   SR.29_21 = SR.31_17;
>  [...]
>   VIEW_CONVERT_EXPR<struct fc50a00__count_type>(R63b.F)._tag ={v} D.1941_9;
>   SR.30_22 = R63b.F.count;
>   SR.29_23 = R63b.F._tag;
>  [...]
>   R63b.F.count ={v} SR.30_22;
>   R63b.F._tag ={v} SR.29_23;
>
>  R63b.F.count is left uninitialized.
>
>  Tested on i586-suse-linux, OK for mainline?

Ok.

Thanks,
Richard.

>  2008-04-20  Eric Botcazou  <ebotcazou@adacore.com>
>
>         * tree-sra.c (sra_walk_expr) <VIEW_CONVERT_EXPR>: Disable
>         scalarization if on the LHS and not a full access.
>
>
>  --
>  Eric Botcazou
>


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