This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
That being said, I see no reason why your patch would prevent these optimizations.
void 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.
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:
int f (int a, int b) { return a/b; }
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |