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] |
On 5/7/07, Richard Guenther <richard.guenther@gmail.com> wrote: > No, I don't see an easy way around this problem. But won't using unsigned > sizetype cause some problems with number-of-iterations analysis as well? > > But of course not being able to fold > > if (p (pplus) 4 > p (pplus) -4) > > doesn't look like a better problem to solve.
Why do you think we still cannot fold this? We do already on the branch: apinski@debian:~/src/gcc-fsf/pointerplusexpr$ cat t.c int f(int *a) { return (a+4) > (a+(-4)); }
I was sure we still can. Just from the documentation of POINTER_PLUS_EXPR this isn't clear.
int *p; for (int i = -n; i < n; ++i) { t1 = (unsigned sizetype)i; t2 = 4 * t1; p2 = p (pplus) t2; use(*p2); }
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |