ICC instruction selection issues

ICC instruction selection issues

I was compiling some platform independent code for Itanium. The code performs a population count operation using a series of masks, shifts and adds. ICC did not replace this code sequence with a single machine level POPCOUNT instruction, but rather translated it directly.

I was wondering if in general it is possible to code in C the more specialized instructions (such as POPCOUNT or MUX) in a manner such that the compiler can match the C code to the instruction, or does one have to use the intrinsics to get this functionality?



1 post / 0 new
For more complete information about compiler optimizations, see our Optimization Notice.