[sh PATCH] PR/27717, sh backend lies to reload about index registers
Mon Aug 21 17:43:00 GMT 2006
> That being said, I see no reason why your patch would prevent these
In fact your sanity check passes.
> f(int i, int *a, int *b, int c)
> while (i--)
> a[i] = b[i] / c;
> should only have two multiplies, a load, a store and some eight
> shifts/additions/subtractions inside the loop.
If you have some time, a check for having just one ldx.ub and ldx.w
could be easily put in the testsuite...
> This should use exactly nine muls instructions, and exactly one ldx.ub
> and one ldx.w:
> __complex__ int
> f (__complex__ int c, int d)
> return c/d;
> When you compile this testcase with -mdiv=inv:fp -O2, no table loads
> should be left:
> f (int a, int b)
> return a/b;
More information about the Gcc-patches