Selective Use of gatherhint/scatterhint Instructions
This note documents a known hardware issue with early alpha hardware of the Intel® Xeon® Phi™ coprocessor (A0 stepping from 2011) and an undocumented option to work around it.
The -mGLOB_default_function_attrs=”use_gather_scatter_hint=on” compiler option can be used to generate gatherhint/scatterhint instructions. This is useful if your code is doing non-unit stride accesses and/or uses indirect addressing via pointers or index arrays.
Here is the compiler behavior related to gatherhint/scatterhint generation:
Behavior in the compiler:
1. By default compiler does not generate gatherhint and nop
2. When -mGLOB_default_function_attrs=”use_gather_scatter_hint=on” is specified, it generates gatherhint with a nop.
One can get the benefit of gather hints in current compilers using this option.
The gatherhint/scatterhint instructions are useful for codes with non-unit stride memory accesses, and codes using indirect addressing through pointers or index arrays.
It is essential that you read this guide from start to finish using the built-in hyperlinks to guide you along a path to a successful port and tuning of your application(s) on Intel® Xeon Phi™Coprocessors. The paths provided in this guide reflect the steps necessary to get best possible application performance.
Back to Advanced MIC Optimizations chapter