possible gcse failure: not able to eliminate redundant loads
Richard Henderson
rth@redhat.com
Fri Dec 13 02:42:00 GMT 2002
On Fri, Dec 13, 2002 at 11:26:34AM +0530, Sanjiv Kumar Gupta, Noida wrote:
> b[2] = a[1];
> for (j = 0; j < i; j++)
> {
> if (i)
> b[3] = a[1];
Yes, this requires more knowledge than is present in loop.
Ignoring the first statement, we cannot hoist a[1] because
it is only conditionally executed and might trap. But we
don't have any code that knows how to propagate the fact
that we've already loaded from a earlier.
This case needs some form of gcse to work.
r~
More information about the Gcc
mailing list