This is the mail archive of the gcc@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] |
void func (double *a, double *b, int i) { b[2] = a[1]; for (i ; i < 3; i = i + 8) { a[4] = a[1]; } }for -O2 -fno-argument-alias, I am getting multiple loads for a[1].Oooops! I realized it just now. Basically GCC is assuming that a[4] and a[1] may alias, hence reloading a[1] in each loop iteration. sorry for the inconvenience caused.
But surely it should be smart enough to know they don't alias? This is still a bug, possibly an important one for performance.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |