This is the mail archive of the
mailing list for the GCC project.
Re: [sh PATCH] PR/27717, sh backend lies to reload about index registers
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)
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:
f (__complex__ int c, int d)
When you compile this testcase with -mdiv=inv:fp -O2, no table loads
should be left:
f (int a, int b)