Commit d9c64246 by Changpeng Fang Committed by Changpeng Fang

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
parent 7a9d7a4f
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> 2011-03-04 Richard Sandiford <richard.sandiford@linaro.org>
* dwarf2out.c (compare_loc_operands): Fix address handling. * dwarf2out.c (compare_loc_operands): Fix address handling.
......
...@@ -34747,9 +34747,9 @@ ix86_preferred_simd_mode (enum machine_mode mode) ...@@ -34747,9 +34747,9 @@ ix86_preferred_simd_mode (enum machine_mode mode)
switch (mode) switch (mode)
{ {
case SFmode: case SFmode:
return TARGET_AVX ? V8SFmode : V4SFmode; return (TARGET_AVX && !flag_prefer_avx128) ? V8SFmode : V4SFmode;
case DFmode: case DFmode:
return TARGET_AVX ? V4DFmode : V2DFmode; return (TARGET_AVX && !flag_prefer_avx128) ? V4DFmode : V2DFmode;
case DImode: case DImode:
return V2DImode; return V2DImode;
case SImode: case SImode:
...@@ -266,6 +266,10 @@ Target RejectNegative Var(flag_dispatch_scheduler) ...@@ -266,6 +266,10 @@ Target RejectNegative Var(flag_dispatch_scheduler)
Do dispatch scheduling if processor is bdver1 and Haifa scheduling Do dispatch scheduling if processor is bdver1 and Haifa scheduling
is selected. 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 ;; ISA support
m32 m32
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment