On Tue, Jul 27, 2021 at 10:05 AM Richard Biener
<[email protected]> wrote:
>
> On Sun, Jul 25, 2021 at 1:58 PM Uecker, Martin
> <[email protected]> wrote:
> >
> >
> >
> > Hi Richard,
> >
> > here is another case where it seems that TBAA goes
> > wrong. Since this is not in a loop, it seems this
> > is something else than what we discussed. Is
> > this a known issue?
>
> No, it's not known and it is a bug. It seems to be
> related to doing
>
> Value numbering stmt = pu_6(D)->x = xy_7;
> Store matched earlier value, value numbering store vdefs to matching vuses.
> Setting value number of .MEM_8 to .MEM_5 (changed)
>
> I'm looking into it.
I've filed PR101641
>
> Richard.
>
> > Best,
> > Martin
> >
> >
> > #include <stdio.h>
> > #include <stdlib.h>
> >
> > union u {
> > long x;
> > long long y;
> > };
> >
> > __attribute__((noinline,noclone))
> > long test(long *px, long long *py, union u *pu)
> > {
> > *px = 0;
> > *py = 1;
> >
> > long xy = pu->y;
> > pu->x = xy;
> >
> > return *px;
> > }
> >
> > int main(void)
> > {
> > union u u;
> > printf("%ld\n", test(&u.x, &u.y, &u));
> > }
> >
> > https://godbolt.org/z/a9drezEza
> >