Introduce flag -mprefer-avx128 for the auto-vectorizer to generate only 128-bit avx insns.

* config/i386/i386.opt (mprefer-avx128): New flag.
	* config/i386/i386.c (ix86_preferred_simd_mode): Prefer 128-bit mode
	when the flag -mprefer-avx128 is on.

From-SVN: r170681
This commit is contained in:
Changpeng Fang 2011-03-04 17:56:39 +00:00 committed by Changpeng Fang
parent 7a9d7a4f86
commit d9c6424620
3 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2011-03-04 Changpeng Fang <changpeng.fang@amd.com>
* config/i386/i386.opt (mprefer-avx128): New flag.
* config/i386/i386.c (ix86_preferred_simd_mode): Prefer 128-bit mode
when the flag -mprefer-avx128 is on.
2011-03-04 Richard Sandiford <richard.sandiford@linaro.org>
* dwarf2out.c (compare_loc_operands): Fix address handling.

View File

@ -34747,9 +34747,9 @@ ix86_preferred_simd_mode (enum machine_mode mode)
switch (mode)
{
case SFmode:
return TARGET_AVX ? V8SFmode : V4SFmode;
return (TARGET_AVX && !flag_prefer_avx128) ? V8SFmode : V4SFmode;
case DFmode:
return TARGET_AVX ? V4DFmode : V2DFmode;
return (TARGET_AVX && !flag_prefer_avx128) ? V4DFmode : V2DFmode;
case DImode:
return V2DImode;
case SImode:

View File

@ -266,6 +266,10 @@ Target RejectNegative Var(flag_dispatch_scheduler)
Do dispatch scheduling if processor is bdver1 and Haifa scheduling
is selected.
mprefer-avx128
Target Report Var(flag_prefer_avx128) Init(0)
Use 128-bit AVX instructions instead of 256-bit AVX instructions in the auto-vectorizer.
;; ISA support
m32