https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124261

--- Comment #4 from rguenther at suse dot de <rguenther at suse dot de> ---
> Am 24.05.2026 um 04:32 schrieb pinskia at gcc dot gnu.org 
> <[email protected]>:
> 
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124261
> 
> Drea Pinski <pinskia at gcc dot gnu.org> changed:
> 
>           What    |Removed                     |Added
> ----------------------------------------------------------------------------
>           Severity|normal                      |enhancement
> 
> --- Comment #3 from Drea Pinski <pinskia at gcc dot gnu.org> ---
> So if we thread the blocks we do the right thing:
> ```
> struct a {int a, b,c,d,e,g;};
> struct a ret();
> void h();
> int
> test (int o)
> {
>        struct a aa,cc;
>        struct a *bb = o ? &aa : &cc;
>        int *p = o ? &aa.b : &cc.b;
>        int *q = o ? &aa.a : &cc.a;
>        *bb = ret ();
>        *p = 12345;
>        *q = 0;
>        int t =  *p;
>        if (o)  h();
>        return t;
> }
> ```
> 
> I wonder if we could do phiprop for stores. That would fix the orginal case I
> think. But maybe there is some more complex case that makes a difference
> though.

Sinking has limited ways of commoning trailing stores that could possibly be
enhanced.  Otherwise it’s only PRE that can possibly CSE/disambiguate without
that.

> 
> --
> You are receiving this mail because:
> You are on the CC list for the bug.

Reply via email to