-qsimd

Category

Optimization and tuning

@PROCESS

None.

Purpose

Controls whether the compiler can automatically take advantage of vector instructions for processors that support them.

These instructions can offer higher performance when used with algorithmic-intensive tasks such as multimedia applications.

Syntax

Read syntax diagramSkip visual syntax diagram -q simd = autonoauto

Defaults

Whether -qsimd is specified or not, -qsimd=auto is implied when both of the following conditions are satisfied; otherwise, -qsimd=noauto is implied.
  • The optimization level is -O3 or higher.
  • -qarch is set to pwr7 or higher.

Usage

The -qsimd=auto option enables automatic generation of vector instructions for processors that support them. When -qsimd=auto is in effect, the compiler converts certain operations that are performed in a loop on successive elements of an array into vector instructions. These instructions calculate several results at one time, which is faster than calculating each result sequentially. These options are useful for applications with significant image processing demands.

The -qsimd=noauto option disables the conversion of loop array operations into vector instructions.

The -qsimd=auto option controls the autosimdization, which was performed by the deprecated -qhot=simd option. If you specify -qhot=simd, the compiler ignores it and does not issue any warning message.

Specifying the deprecated -qenablevmx option has the same effect as specifying -qsimd=auto. The compiler does not issue any warning for this.

Notes:
  • Specifying -qsimd without any suboption is equivalent to -qsimd=auto.
  • Specifying -qsimd=auto does not guarantee that autosimdization will occur.
  • Using vector instructions to calculate several results at one time might delay or even miss detection of floating-point exceptions on some architectures. If detecting exceptions is important, do not use -qsimd=auto.

Rules

If you enable link-time optimization (LTO) and specify -qsimd=auto at the LTO compile step, but specify -qsimd=noauto at the LTO link step, the compiler automatically sets -qsimd=auto at the LTO link step. It also sets an appropriate value for -qarch to match the architecture that is specified at the compile time. Similarly, if you enable LTO and specify -qsimd=noauto at the LTO compile step, but specify -qsimd=auto at the LTO link step, the compiler automatically sets -qsimd=auto at the compile step.

Related information