You can unroll loops and specify the maximum number of times you want the compiler to do so.
You use the -unroll[n] option to unroll loops. n determines the maximum number of times for the unrolling operation. This applies only to loops that the compiler determines should be unrolled. Omit n to let the compiler decide whether to perform unrolling or not.
The following example unrolls a loop at most four times:
IA-32 Systems: prompt>icc -unroll4 a.cpp
Disable loop unrolling by setting n to 0.
The following example disables loop unrolling:
IA-32 Systems: prompt>icc -unroll0 a.cpp