From: Richard Sandiford Date: Wed, 13 Jul 2011 11:17:00 +0000 (+0000) Subject: tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Tighten overlap check. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=36fc37994d59371be0bfa678011233a4bc3d3dd3;p=gcc.git tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Tighten overlap check. gcc/ * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Tighten overlap check. From-SVN: r176229 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index db549522ee7..cddbb717107 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2011-07-13 Richard Sandiford + + * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Tighten + overlap check. + 2011-07-13 Richard Sandiford * tree.h (categorize_ctor_elements): Remove comment. Fix long line. diff --git a/gcc/tree-vect-loop-manip.c b/gcc/tree-vect-loop-manip.c index a120fb153aa..b8d67804f77 100644 --- a/gcc/tree-vect-loop-manip.c +++ b/gcc/tree-vect-loop-manip.c @@ -2409,13 +2409,13 @@ vect_create_cond_for_alias_checks (loop_vec_info loop_vinfo, tree part_cond_expr, length_factor; /* Create expression - ((store_ptr_0 + store_segment_length_0) < load_ptr_0) - || (load_ptr_0 + load_segment_length_0) < store_ptr_0)) + ((store_ptr_0 + store_segment_length_0) <= load_ptr_0) + || (load_ptr_0 + load_segment_length_0) <= store_ptr_0)) && ... && - ((store_ptr_n + store_segment_length_n) < load_ptr_n) - || (load_ptr_n + load_segment_length_n) < store_ptr_n)) */ + ((store_ptr_n + store_segment_length_n) <= load_ptr_n) + || (load_ptr_n + load_segment_length_n) <= store_ptr_n)) */ if (VEC_empty (ddr_p, may_alias_ddrs)) return; @@ -2484,8 +2484,8 @@ vect_create_cond_for_alias_checks (loop_vec_info loop_vinfo, part_cond_expr = fold_build2 (TRUTH_OR_EXPR, boolean_type_node, - fold_build2 (LT_EXPR, boolean_type_node, seg_a_max, seg_b_min), - fold_build2 (LT_EXPR, boolean_type_node, seg_b_max, seg_a_min)); + fold_build2 (LE_EXPR, boolean_type_node, seg_a_max, seg_b_min), + fold_build2 (LE_EXPR, boolean_type_node, seg_b_max, seg_a_min)); if (*cond_expr) *cond_expr = fold_build2 (TRUTH_AND_EXPR, boolean_type_node,