3.21 Vectorization and struct member lengths

NEON structure loads require that all members of a structure are of the same length.

In the example code below, the compiler does not attempt to use vector loads because of the inconsistent structure member lengths.

struct foo
{
    short a;
    int b;
    short c;
} n[10];

This code could be rewritten for vectorization by using the same data type throughout the structure. For example, if the variable b is to be of type int, consider making variables a and c of type int rather than short.

Non-ConfidentialPDF file icon PDF versionARM DUI0472M
Copyright © 2010-2016 ARM Limited or its affiliates. All rights reserved.