# falign-loops, Qalign-loops

Aligns loops to a power-of-two byte boundary.

## Syntax

Linux: | -falign-loops[=n] -fno-align-loops

macOS: | -falign-loops[=n] -fno-align-loops

Windows: | /Qalign-loops[:n] /Qalign-loops-

## Arguments

n | Is the optional number of bytes for the minimum alignment boundary. It must be a power of 2 between 1 and 4096, such as 1, 2, 4, 8, 16, 32, 64, 128, and so on. If you specify 1 for n, no alignment is performed; this is the same as specifying the negative form of the option. If you do not specify n, the default alignment is 16 bytes.

## Default

-fno-align-loops or /Qalign-loops- | No special loop alignment is performed.

## Description

This option aligns loops to a power-of-two boundary. This alignment may improve performance.

It can be affected by the pragma code_align and attribute code_align.

If code is compiled with the -falign-loops=m (Linux* and macOS*) or /Qalign-loops:m (Windows*) option and a code_align:n pragma precedes a loop, the loop is aligned on a max (m, n) byte boundary. If a function is modified by a code_align:k pragma and a code_align:n pragma precedes a loop, then both the function and the loop are aligned on a max (k, n) byte boundary.

## IDE Equivalent

None

## Alternate Options

None

Parent topic: Data Options

## See Also

falign-functions, Qfnalign compiler option