Skip to content
Snippets Groups Projects
Commit 3064d1f5 authored by liuhongt's avatar liuhongt
Browse files

Software mitigation: Disable gather generation in vectorization for GDS affected Intel Processors.

For more details of GDS (Gather Data Sampling), refer to
https://www.intel.com/content/www/us/en/developer/articles/technical/software-security-guidance/advisory-guidance/gather-data-sampling.html

After microcode update, there's performance regression. To avoid that,
the patch disables gather generation in autovectorization but uses
gather scalar emulation instead.

gcc/ChangeLog:

	* config/i386/i386-options.cc (m_GDS): New macro.
	* config/i386/x86-tune.def (X86_TUNE_USE_GATHER_2PARTS): Don't
	enable for m_GDS.
	(X86_TUNE_USE_GATHER_4PARTS): Ditto.
	(X86_TUNE_USE_GATHER): Ditto.

gcc/testsuite/ChangeLog:

	* gcc.target/i386/avx2-gather-2.c: Adjust options to keep
	gather vectorization.
	* gcc.target/i386/avx2-gather-6.c: Ditto.
	* gcc.target/i386/avx512f-pr88464-1.c: Ditto.
	* gcc.target/i386/avx512f-pr88464-5.c: Ditto.
	* gcc.target/i386/avx512vl-pr88464-1.c: Ditto.
	* gcc.target/i386/avx512vl-pr88464-11.c: Ditto.
	* gcc.target/i386/avx512vl-pr88464-3.c: Ditto.
	* gcc.target/i386/avx512vl-pr88464-9.c: Ditto.
	* gcc.target/i386/pr88531-1b.c: Ditto.
	* gcc.target/i386/pr88531-1c.c: Ditto.
parent f5f7d03b
No related branches found
No related tags found
Loading
Showing with 18 additions and 13 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment