Missed optimisation in __udivmoddi4 of libgcc2

2020-09-13 Thread Stefan Kanthak
libgcc2 provides "double-word" division as __udivmoddi4() The following part of its source | UWtype d0, d1, n0, n1, n2; | UWtype b, bm; ... | count_leading_zeros (bm, d1); | if (bm == 0) ... | else | { | UWtype m1, m0; | /* Normalize. */ | | b = W_TYPE_SIZE - bm;

Re: Missed optimisation

2007-05-13 Thread Eric Christopher
On May 13, 2007, at 3:48 AM, Tom Womack wrote: I have some code of the form This really isn't enough, I put a bit of a testcase together, but nothing that would give bad behavior at -O3 (there is no -O9). Have more of a testcase? Something compilable? -eric

Missed optimisation

2007-05-13 Thread Tom Womack
I have some code of the form const int primes[] = {7,11,13,17,19}; const int nprimes = sizeof(primes)/sizeof(int); and later an inmost loop of the form bool happy = true; for (int i=0; i