OSDN Git Service

gcc/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Jul 2011 11:17:00 +0000 (11:17 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 13 Jul 2011 11:17:00 +0000 (11:17 +0000)
* tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Tighten
overlap check.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@176229 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/tree-vect-loop-manip.c

index db54952..cddbb71 100644 (file)
@@ -1,5 +1,10 @@
 2011-07-13  Richard Sandiford  <richard.sandiford@linaro.org>
 
+       * tree-vect-loop-manip.c (vect_create_cond_for_alias_checks): Tighten
+       overlap check.
+
+2011-07-13  Richard Sandiford  <richard.sandiford@linaro.org>
+
        * tree.h (categorize_ctor_elements): Remove comment.  Fix long line.
        (count_type_elements): Delete.
        (complete_ctor_at_level_p): Declare.
index a120fb1..b8d6780 100644 (file)
@@ -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,