Check preferred vector mode for vector type in estimate_move_cost.
gcc/ 2010-11-10 H.J. Lu <hongjiu.lu@intel.com> PR tree-optimization/46414 * tree-inline.c (estimate_move_cost): Check preferred vector mode for vector type. gcc/testsuite/ 2010-11-10 H.J. Lu <hongjiu.lu@intel.com> PR tree-optimization/46414 * gcc.target/i386/recip-vec-sqrtf-avx.c: Updated for loop unrolling. From-SVN: r166552
This commit is contained in:
parent
e6a054481d
commit
c204d113c0
4 changed files with 23 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
2010-11-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR tree-optimization/46414
|
||||
* tree-inline.c (estimate_move_cost): Check preferred vector
|
||||
mode for vector type.
|
||||
|
||||
2010-11-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||
|
||||
* config/alpha/osf5.h (ASM_SPEC): Remove -nocpp.
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
2010-11-10 H.J. Lu <hongjiu.lu@intel.com>
|
||||
|
||||
PR tree-optimization/46414
|
||||
* gcc.target/i386/recip-vec-sqrtf-avx.c: Updated for loop
|
||||
unrolling.
|
||||
|
||||
2010-11-10 Tobias Burnus <burnus@net-b.de>
|
||||
|
||||
PR fortran/46411
|
||||
|
|
|
@ -32,4 +32,4 @@ void t3(void)
|
|||
}
|
||||
|
||||
/* Last loop is small enough to be fully unrolled. */
|
||||
/* { dg-final { scan-assembler-times "vrsqrtps\[ \\t\]+\[^\n\]*%ymm" 4 } } */
|
||||
/* { dg-final { scan-assembler-times "vrsqrtps\[ \\t\]+\[^\n\]*%ymm" 6 } } */
|
||||
|
|
|
@ -3249,6 +3249,16 @@ estimate_move_cost (tree type)
|
|||
|
||||
gcc_assert (!VOID_TYPE_P (type));
|
||||
|
||||
if (TREE_CODE (type) == VECTOR_TYPE)
|
||||
{
|
||||
enum machine_mode inner = TYPE_MODE (TREE_TYPE (type));
|
||||
enum machine_mode simd
|
||||
= targetm.vectorize.preferred_simd_mode (inner);
|
||||
int simd_mode_size = GET_MODE_SIZE (simd);
|
||||
return ((GET_MODE_SIZE (TYPE_MODE (type)) + simd_mode_size - 1)
|
||||
/ simd_mode_size);
|
||||
}
|
||||
|
||||
size = int_size_in_bytes (type);
|
||||
|
||||
if (size < 0 || size > MOVE_MAX_PIECES * MOVE_RATIO (!optimize_size))
|
||||
|
|
Loading…
Add table
Reference in a new issue