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: Data dependence merge



On Oct 11, 2004, at 2:05 PM, Sebastian Pop wrote:





+#define FLOOR(x,y) (CEIL (x, y) - ((int_divides_p (y, x)) ? 0 : 1))
+

FLOOR_DIV(X, Y) is simply ((X) / (Y)) in C


Or, if you really want to not deal with truncation, (x - (x % y)) / y

Unless you have to handle negative numbers, in which case i guess the
above is better ;)

Correct my definition as you think is better. Thanks.




I have bootstrapped and tested this patch (with FLOOR renamed to FLOOR_DIV, and the definition changed to simply be x / y) on i686-pc-linux-gnu, ppc64-linux, and powerpc-darwin.

I'll be checking it in in a few hours, to give people time to object.
The interchange tests are working and will be submitted sometime today, hopefully.


Sebastian


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