diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-05-10 07:52:25 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-05-10 07:52:25 +0000 |
commit | 2cd0995ea93ec8a322dafc79a544d79f012918dd (patch) | |
tree | b74da88625d1181dbe2a76c0891227920028cbd0 /gcc/tree-vect-loop.c | |
parent | 15ba1c5fd575653432103a4a05e0ddc764f737bc (diff) | |
download | gcc-2cd0995ea93ec8a322dafc79a544d79f012918dd.tar.gz |
2013-05-10 Richard Biener <rguenther@suse.de>
* tree-vect-data-refs.c (vect_enhance_data_refs_alignment): Do not
disable peeling when we version for aliasing.
(vector_alignment_reachable_p): Honor explicit user alignment.
(vect_supportable_dr_alignment): Likewise.
* tree-vect-loop-manip.c (vect_can_advance_ivs_p): Use
STMT_VINFO_LOOP_PHI_EVOLUTION_PART instead of recomputing it.
* tree-vect-loop.c (vect_transform_loop): First apply versioning,
then peeling to arrange for the cost-model check to come first.
* gcc.target/i386/avx256-unaligned-load-2.c: Make well-defined.
* gcc.target/i386/l_fma_double_1.c: Adjust.
* gcc.target/i386/l_fma_double_2.c: Likewise.
* gcc.target/i386/l_fma_double_3.c: Likewise.
* gcc.target/i386/l_fma_double_4.c: Likewise.
* gcc.target/i386/l_fma_double_5.c: Likewise.
* gcc.target/i386/l_fma_double_6.c: Likewise.
* gcc.target/i386/l_fma_float_1.c: Likewise.
* gcc.target/i386/l_fma_float_2.c: Likewise.
* gcc.target/i386/l_fma_float_3.c: Likewise.
* gcc.target/i386/l_fma_float_4.c: Likewise.
* gcc.target/i386/l_fma_float_5.c: Likewise.
* gcc.target/i386/l_fma_float_6.c: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@198767 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 40eccea5500..0fb2daed370 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -5499,19 +5499,22 @@ vect_transform_loop (loop_vec_info loop_vinfo) check_profitability = true; } - /* Peel the loop if there are data refs with unknown alignment. - Only one data ref with unknown store is allowed. */ + /* Version the loop first, if required, so the profitability check + comes first. */ - if (LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo)) + if (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT (loop_vinfo) + || LOOP_REQUIRES_VERSIONING_FOR_ALIAS (loop_vinfo)) { - vect_do_peeling_for_alignment (loop_vinfo, th, check_profitability); + vect_loop_versioning (loop_vinfo, th, check_profitability); check_profitability = false; } - if (LOOP_REQUIRES_VERSIONING_FOR_ALIGNMENT (loop_vinfo) - || LOOP_REQUIRES_VERSIONING_FOR_ALIAS (loop_vinfo)) + /* Peel the loop if there are data refs with unknown alignment. + Only one data ref with unknown store is allowed. */ + + if (LOOP_PEELING_FOR_ALIGNMENT (loop_vinfo)) { - vect_loop_versioning (loop_vinfo, th, check_profitability); + vect_do_peeling_for_alignment (loop_vinfo, th, check_profitability); check_profitability = false; } |