Vectorizer Options

Vectorization is an IA-32-specific feature and can be summarized by the command line options described in the following tables. Vectorization depends upon the compiler's ability to disambiguate memory references. Certain options may enable the compiler to do better vectorization. These options can enable other optimizations in addition to vectorization. When an -x{K|W|N|B|P} or
-ax{K|W|N|B|P
} is used and -O2 (which is ON by default) is also in effect, the vectorizer is enabled. The -x{K|W|N|B|P} or -ax{K|W|N|B|P} options enable vectorizer with -O1 and -O3 options also.

-x{K|W|N|B|P}

Generate specialized code to run exclusively on the processors supporting the extensions indicated by {K|W|N|B|P}. See Processor-Specific Exclusive Specialized Code (IA-32 only) for details.

-ax{K|W|N|B|P}

Generates, in a single binary, code specialized to the extensions specified by {K|W|N|B|P} and also generic IA-32 code. The generic code is usually slower. See Processor Automatic Non-Exclusive Specialized Code (IA-32 only) for details.

-vec_report
{0|1|2|3|4|5}

Default:
-vec_report1

Controls the diagnostic messages from the vectorizer, see subsection that follows the table.
 

Vectorization Reports

The -vec_report{0|1|2|3|4|5} options directs the compiler to generate the vectorization reports with different level of information as follows:

-vec_report0: no diagnostic information is displayed

-vec_report1: display diagnostics indicating loops successfully vectorized (default)

-vec_report2: same as -vec_report1, plus diagnostics indicating loops not successfully vectorized

-vec_report3: same as -vec_report2, plus additional information about any proven or assumed dependences
-vec_report4
: indicate non-vectorized loops
-vec_report5
: indicate non-vectorized loops and the reason why they were not vectorized.

Usage with Other Options

The vectorization reports are generated in the final compilation phase when executable is generated. Therefore if you use the -c option and a -vec_report{n} option in the command line, no report will be generated.

If you use -c, -ipo and -x{K|W|N|B|P} or -ax{K|W|N|B|P} and -vec_report{n}, the compiler issues a warning and no report is generated.

To produce a report when using the above mentioned options, you need to add the -ipo_obj option. The combination of -c and -ipo_obj produces a single file compilation, and hence does generate object code, and eventually a report is generated.

The following commands generate vectorization report:

ifort -x{K|W|N|B|P} -vec_report3 file.f

ifort -x{K|W|N|B|P} -ipo -ipo_obj -vec_report3 file.f

ifort -c -x{K|W|N|B|P} -ipo -ipo_obj -vec_report3 file.f