[tree-ssa] Bug in jump threading
law@redhat.com
law@redhat.com
Thu Feb 5 19:28:00 GMT 2004
In message <20040205095804.GA32427@atrey.karlin.mff.cuni.cz>, Zdenek Dvorak wri
tes:
>
>--zhXaljGHf11kAtnf
>Content-Type: text/plain; charset=us-ascii
>Content-Disposition: inline
>
>Hello,
>
>the jump threading works incorrectly in this situation:
>
>x_1 = pointer;
>t_1 = x_1->field;
>
>if (t_1)
> goto L1;
>
> ...
>
>
>L1:
> x1_1 = pointer;
> if (!x1_1)
> goto L2;
>
>...
>
>L2:
> x1_2 = phi (..., x1_1 (from L1 block));
> ...
>
>before the goto L1 is threaded to L2, variables are rewritten out of
>ssa:
>
>x = pointer;
>t_1 = x->field;
>
>if (t_1)
> goto L1;
>
> ...
>
>
>L1:
> x1 = pointer;
> if (!x1)
> goto L2;
>
> ...
>
>L2:
> ...
>
>Now when you thread the jump, you lose the assignment to x1.
Thanks. I had run into this once, but after some changes elsewhere I
had been unable to trigger it again no matter how hard I tried and
ended up dropping the hunk which dealt with this problem.
This shouldn't be terribly difficult to fix. The only "trick" is I'll
be on the road the rest of this week (sigh).
jeff
More information about the Gcc
mailing list