arch

Tells the compiler to generate code specialized for the processor that executes your program.

IDE Equivalent

Windows: Code Generation > Enable Enhanced Instruction Set

Linux: None

Mac OS X: None

Architectures

IA-32, Intel® 64 architectures

Syntax

Linux and Mac OS X:

-arch code

Windows:

/arch:code

Arguments

code

Indicates the instructions to be generated for the set of processors in each description. Many of the following descriptions refer to Intel® Streaming SIMD Extensions (Intel® SSE) and Supplemental Streaming SIMD Extensions (Intel® SSSE). Possible values are:

CORE-AVX2

May generate Intel® Advanced Vector Extensions 2 (Intel® AVX2), Intel® AVX, SSE4.2, SSE4.1, SSSE3, SSE3, SSE2, and SSE instructions.

CORE-AVX-I

May generate Intel® Advanced Vector Extensions (Intel® AVX), including instructions in Intel® Core 2™ processors in process technology smaller than 32nm, SSE4.2, SSE4.1, SSSE3, SSE3, SSE2, and SSE instructions.

AVX

May generate Intel® Advanced Vector Extensions (Intel® AVX), SSE4.2, SSE4.1, SSSE3, SSE3, SSE2, and SSE instructions.

SSE4.2

May generate Intel® SSE4.2, SSE4.1, SSSE3, SSE3, SSE2, and SSE instructions.

SSE4.1

May generate Intel® SSE4.1, SSSE3, SSE3, SSE2, and SSE instructions.

SSSE3

May generate Intel® SSSE3, SSE3, SSE2, and SSE instructions.

SSE3

May generate Intel® SSE3, SSE2, and SSE instructions.

SSE2

May generate Intel® SSE2 and SSE instructions. This value is only available on Linux and Windows systems.

SSE

This option has been deprecated; it is now the same as specifying IA32.

IA32

Generates x86/x87 generic code that is compatible with IA-32 architecture. Disables any default extended instruction settings, and any previously set extended instruction settings. It also disables all processor-specific optimizations and instructions. This value is only available on Linux and Windows systems using IA-32 architecture.

Default

Windows and Linux systems: SSE2
Mac OS X systems using IA-32 architecture: SSE3
Mac OS X systems using Intel® 64 architecture: SSSE3

For more information on the default values, see Arguments above.

Description

This option tells the compiler to generate code specialized for the processor that executes your program.

Code generated with these options should execute on any compatible, non-Intel processor with support for the corresponding instruction set.

Options /arch and /Qx are mutually exclusive. If both are specified, the compiler uses the last one specified and generates a warning.

For compatibility with Compaq* Visual Fortran, the compiler allows the following keyword values. However, you should use the suggested replacements.

Compatibility Value

Suggested Replacement

pn1

-mia32 or /arch:IA32

pn2

-mia32 or /arch:IA32

pn3

-mia32 or /arch:IA32

pn4

-msse2 or /arch:SSE2

Alternate Options

Linux and Mac OS X: -m

Windows: /architecture (this is a deprecated option)

See Also


Submit feedback on this help topic

Copyright © 1996-2011, Intel Corporation. All rights reserved.