> 
> Hi folks.
> 
> While investigating a regression from the V_MUST_DEF removal on mem-ssa,
> I've noticed that we were missing out on optimization of certain
> stores to complex types (on mainline).
> 
> For example, here:
> 
>   _Complex int t = 0;
>  __real__ t = 2;
>  __imag__ t = 2;
> 
> we end up with:
> 
>   #   t_2 = V_MUST_DEF <t_1>;
>   t = __complex__ (0, 0);
>   #   t_3 = V_MAY_DEF <t_2>;
>   REALPART_EXPR <t> = 2;
>   #   t_4 = V_MAY_DEF <t_3>;
>   IMAGPART_EXPR <t> = 2;
> 
> When we really should be decomposing the field stores into SFTs, like this:
> 
>   #   SFT.0_3 = V_MUST_DEF <SFT.0_1>;
>   #   SFT.1_4 = V_MUST_DEF <SFT.1_2>;
>   t = __complex__ (0, 0);
>   #   SFT.1_5 = V_MUST_DEF <SFT.1_4>;
>   REALPART_EXPR <t> = 2;
>   #   SFT.0_6 = V_MUST_DEF <SFT.0_3>;
>   IMAGPART_EXPR <t> = 2;

Relooking at the orginal testcase which actually has a read in it, This
seems like the wrong approach.  Can you figure out why write_only is not
being set to false for the orginal testcase (and not the reduced one)?


-- Pinski

Reply via email to