3.11 Recommended loop structure for vectorization

The overall structure of a loop is important for obtaining the best performance from vectorization.

Generally, it is best to write simple loops with iteration counts that are fixed at the start of the loop, and that do not contain complex conditional statements or conditional exits. You might have to rewrite your loops to improve the vectorization performance of the code.

Related concepts
3.17 Nonvectorization on conditional loop exits
3.16 Nonvectorization on loops containing pointers and indirect addressing
3.15 Vectorization on loops containing pointers
3.14 Reduction of a vector to a scalar
3.13 Carry-around scalar variables and vectorization
3.12 Data dependency conflicts when vectorizing code
3.9 Factors affecting NEON vectorization performance
3.6 Automatic vectorization
3.23 Conditional statements and efficient vectorization
Related reference
8.189 --vectorize, --no_vectorize
3.10 NEON vectorization performance goals
Non-ConfidentialPDF file icon PDF versionARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.