Forcing a loop to vectorize may alter the order of computations in the loop, so in certain cases care must be taken where possible flow dependencies may lead to incorrect results. When in doubt, the results of a forcefully vectorized loop should always be tested against those of its scalar version. Vectorizing means processing a loop in chunks of the loop variable, chunks of length up to 64 on the J90, or 128 on the C90 and T90, so that calculations for successive iterations of a loop overlap. If a loop has a recurrence less than the vector length of the machine, forcing the loop to vectorize may give wrong results. VL, i.e., if the recurrence threshold is greater than the vector length of the target machine.
Function calls in a loop inhibit the loop from vectorizing.
This section describes some of the commonly used compiler flags that can enhance vector performance. One can use -hivdep to tell the compiler to ignore vector dependencies for all loops. The loop will then vectorize, assuming it contains no other vectorization-preventing elements. This directive instructs the compiler not to vectorize the immediately following loop. A search loop is a loop that contains one or more conditional expressions that result in an early exit from the loop.