Paul, please consider adding new intrinsic functions that make the X64 instructions LEADZ, TRAILZ and POPCNT available to the Fortran programmer. There are several situations where such a function call can replace an entire DO loop. For example, given an integer variable v, if we wish to divide by the largest power of 2 possible, we could do
nz=trailz(v) if(nz > 0) v = ishft(v,nz)
instead of writing a loop:
WHILE (MOD(v,2).eq.0) DO v = v/2 END DO
Thank you. Of course, these new intrinsics are feasible only when targeting X64.