diff options
author | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-22 12:43:16 +0000 |
---|---|---|
committer | hjl <hjl@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-05-22 12:43:16 +0000 |
commit | cbc9c660a51c0a5b80181b96a680dd888e6ad00b (patch) | |
tree | 63f0f4421ad75511d63828fa645f16face8c9dc8 /gcc/tree-vectorizer.c | |
parent | 6ea2688109c917bd1f3eb3fe938dac29f68f4e4e (diff) | |
download | gcc-cbc9c660a51c0a5b80181b96a680dd888e6ad00b.tar.gz |
2008-05-22 H.J. Lu <hongjiu.lu@intel.com>
* defaults.h (UNITS_PER_SIMD_WORD): Add scalar mode as argument.
* doc/tm.texi (UNITS_PER_SIMD_WORD): Likewise.
* tree-vect-analyze.c (vect_compute_data_ref_alignment): Replace
UNITS_PER_SIMD_WORD with GET_MODE_SIZE (TYPE_MODE (vectype)).
(vect_update_misalignment_for_peel): Likewise.
(vector_alignment_reachable_p): Likewise.
* tree-vect-transform.c (vectorizable_load): Likewise.
* tree-vectorizer.c (vect_supportable_dr_alignment): Likewise.
* tree-vectorizer.c (get_vectype_for_scalar_type): Pass mode of
scalar_type to UNITS_PER_SIMD_WORD.
* config/arm/arm.h (UNITS_PER_SIMD_WORD): Updated.
* config/i386/i386.h (UNITS_PER_SIMD_WORD): Likewise.
* config/mips/mips.h (UNITS_PER_SIMD_WORD): Likewise.
* config/rs6000/rs6000.h (UNITS_PER_SIMD_WORD): Likewise.
* config/sparc/sparc.h (UNITS_PER_SIMD_WORD): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@135759 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vectorizer.c')
-rw-r--r-- | gcc/tree-vectorizer.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c index d374a0640d2..c513dda7652 100644 --- a/gcc/tree-vectorizer.c +++ b/gcc/tree-vectorizer.c @@ -1806,12 +1806,12 @@ get_vectype_for_scalar_type (tree scalar_type) int nunits; tree vectype; - if (nbytes == 0 || nbytes >= UNITS_PER_SIMD_WORD) + if (nbytes == 0 || nbytes >= UNITS_PER_SIMD_WORD (inner_mode)) return NULL_TREE; - /* FORNOW: Only a single vector size per target (UNITS_PER_SIMD_WORD) + /* FORNOW: Only a single vector size per mode (UNITS_PER_SIMD_WORD) is expected. */ - nunits = UNITS_PER_SIMD_WORD / nbytes; + nunits = UNITS_PER_SIMD_WORD (inner_mode) / nbytes; vectype = build_vector_type (scalar_type, nunits); if (vect_print_dump_info (REPORT_DETAILS)) @@ -1937,11 +1937,13 @@ vect_supportable_dr_alignment (struct data_reference *dr) && (!targetm.vectorize.builtin_mask_for_load || targetm.vectorize.builtin_mask_for_load ())) { - if (nested_in_vect_loop - && TREE_INT_CST_LOW (DR_STEP (dr)) != UNITS_PER_SIMD_WORD) - return dr_explicit_realign; - else - return dr_explicit_realign_optimized; + tree vectype = STMT_VINFO_VECTYPE (stmt_info); + if (nested_in_vect_loop + && (TREE_INT_CST_LOW (DR_STEP (dr)) + != GET_MODE_SIZE (TYPE_MODE (vectype)))) + return dr_explicit_realign; + else + return dr_explicit_realign_optimized; } if (optab_handler (movmisalign_optab, mode)->insn_code != |