Commit fca132b9 by Uros Bizjak Committed by Uros Bizjak

i386.c (ix86_autovectorize_vector_sizes): Return 0 for !flag_prefer_avx128.

	* config/i386/i386.c (ix86_autovectorize_vector_sizes): Return 0
	for !flag_prefer_avx128.
	(ix86_preferred_simd_mode): Return word_mode for DFmode without SSE2.

From-SVN: r173591
parent 754af126
2011-05-09 Uros Bizjak <ubizjak@gmail.com>
* config/i386/i386.c (ix86_autovectorize_vector_sizes): Return 0
for !flag_prefer_avx128.
(ix86_preferred_simd_mode): Return word_mode for DFmode without SSE2.
2011-05-09 Eric Botcazou <ebotcazou@adacore.com> 2011-05-09 Eric Botcazou <ebotcazou@adacore.com>
* fold-const.c (fold_range_test): Pass LOC to build_range_check. * fold-const.c (fold_range_test): Pass LOC to build_range_check.
......
...@@ -35118,32 +35118,38 @@ has_dispatch (rtx insn, int action) ...@@ -35118,32 +35118,38 @@ has_dispatch (rtx insn, int action)
static enum machine_mode static enum machine_mode
ix86_preferred_simd_mode (enum machine_mode mode) ix86_preferred_simd_mode (enum machine_mode mode)
{ {
/* Disable double precision vectorizer if needed. */ if (!TARGET_SSE)
if (mode == DFmode && !TARGET_VECTORIZE_DOUBLE)
return word_mode;
if (!TARGET_AVX && !TARGET_SSE)
return word_mode; return word_mode;
switch (mode) switch (mode)
{ {
case SFmode:
return (TARGET_AVX && !flag_prefer_avx128) ? V8SFmode : V4SFmode;
case DFmode:
return (TARGET_AVX && !flag_prefer_avx128) ? V4DFmode : V2DFmode;
case DImode:
return V2DImode;
case SImode:
return V4SImode;
case HImode:
return V8HImode;
case QImode: case QImode:
return V16QImode; return V16QImode;
case HImode:
return V8HImode;
case SImode:
return V4SImode;
case DImode:
return V2DImode;
default:; case SFmode:
} if (TARGET_AVX && !flag_prefer_avx128)
return V8SFmode;
else
return V4SFmode;
case DFmode:
if (!TARGET_VECTORIZE_DOUBLE)
return word_mode;
else if (TARGET_AVX && !flag_prefer_avx128)
return V4DFmode;
else if (TARGET_SSE2)
return V2DFmode;
/* FALLTHRU */
return word_mode; default:
return word_mode;
}
} }
/* If AVX is enabled then try vectorizing with both 256bit and 128bit /* If AVX is enabled then try vectorizing with both 256bit and 128bit
...@@ -35152,7 +35158,7 @@ ix86_preferred_simd_mode (enum machine_mode mode) ...@@ -35152,7 +35158,7 @@ ix86_preferred_simd_mode (enum machine_mode mode)
static unsigned int static unsigned int
ix86_autovectorize_vector_sizes (void) ix86_autovectorize_vector_sizes (void)
{ {
return TARGET_AVX ? 32 | 16 : 0; return (TARGET_AVX && !flag_prefer_avx128) ? 32 | 16 : 0;
} }
/* Initialize the GCC target structure. */ /* Initialize the GCC target structure. */
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