aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-data-ref.c
diff options
context:
space:
mode:
authorBin Cheng <bin.cheng@arm.com>2017-05-31 09:01:36 +0000
committerBin Cheng <amker@gcc.gnu.org>2017-05-31 09:01:36 +0000
commitc7d7e2227f72d54ce3ec725693a0fac35455c555 (patch)
tree656b1cc5f244dff861422578f27cc9ae59bb46b7 /gcc/tree-data-ref.c
parent945bafd67aae4e16b8ca0c44db2cf22606551f16 (diff)
downloadgcc-c7d7e2227f72d54ce3ec725693a0fac35455c555.zip
gcc-c7d7e2227f72d54ce3ec725693a0fac35455c555.tar.gz
gcc-c7d7e2227f72d54ce3ec725693a0fac35455c555.tar.bz2
tree-data-ref.c (prune_runtime_alias_test_list): Relax minimal segment length for dr_b and compute it in wide_int.
* tree-data-ref.c (prune_runtime_alias_test_list): Relax minimal segment length for dr_b and compute it in wide_int. gcc/testsuite * gcc.dg/vect/pr80815-3.c: New test. From-SVN: r248725
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r--gcc/tree-data-ref.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c
index cfff7c2..c4275e2 100644
--- a/gcc/tree-data-ref.c
+++ b/gcc/tree-data-ref.c
@@ -1361,14 +1361,10 @@ prune_runtime_alias_test_list (vec<dr_with_seg_len_pair_t> *alias_pairs,
wide_int min_seg_len_b;
tree new_seg_len;
- if (tree_fits_uhwi_p (dr_b1->seg_len))
- {
- min_seg_len_b = dr_b1->seg_len;
- if (tree_int_cst_sign_bit (dr_b1->seg_len))
- min_seg_len_b = wi::neg (min_seg_len_b);
- }
+ if (TREE_CODE (dr_b1->seg_len) == INTEGER_CST)
+ min_seg_len_b = wi::abs (dr_b1->seg_len);
else
- min_seg_len_b = wi::uhwi (factor, TYPE_PRECISION (sizetype));
+ min_seg_len_b = wi::mul (factor, wi::abs (DR_STEP (dr_b1->dr)));
/* Now we try to merge alias check dr_a1 & dr_b and dr_a2 & dr_b.