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]

Re: [PATCH] Fix bitfield-- != 0 transformation in fold-const.c


> Consider x equals zero.  "x-- > -32768" is true, but "--x > 32767" isn't.

Gosh, right.  Maybe it is worth to add a similar but separate optimization to
so that x-- > N becomes --x >= N and x++ < N become ++x <= 0; this would at
least take care of backward-counting loops on targets that cannot activate
doloop optimization.

Paolo



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]